< prev index next > test/hotspot/jtreg/serviceability/jvmti/vthread/SuspendResume2/SuspendResume2.java
Print this page
*/
/*
* @test id=default
* @summary Test SuspendAllVirtualThreads/ResumeAllVirtualThreads
+ * @requires vm.debug != true
* @library /test/lib
* @compile SuspendResume2.java
* @run driver jdk.test.lib.FileInstaller . .
* @run main/othervm/native
* -Djdk.virtualThreadScheduler.maxPoolSize=1
* -agentlib:SuspendResume2
* SuspendResume2
*/
+ /*
+ * @test id=debug
+ * @requires vm.debug == true
+ * @library /test/lib
+ * @compile SuspendResume2.java
+ * @run driver jdk.test.lib.FileInstaller . .
+ * @run main/othervm/native
+ * -Djdk.virtualThreadScheduler.maxPoolSize=1
+ * -agentlib:SuspendResume2
+ * -XX:-VerifyContinuations
+ * SuspendResume2
+ */
+
/*
* @test id=no-vmcontinuations
* @requires vm.continuations
* @library /test/lib
* @compile SuspendResume2.java
int i = 0;
int n = 1000;
while (!shouldFinish) {
if (n <= 0) {
n = 1000;
- SuspendResume2.sleep(1);
+ SuspendResume2.sleep(10);
}
if (i > n) {
i = 0;
n = n - 1;
}
// ensure thread is ready
public void ensureReady() {
try {
while (!threadReady) {
- sleep(1);
+ sleep(100);
}
} catch (InterruptedException e) {
throw new RuntimeException("Interruption while preparing tested thread: \n\t" + e);
}
}
< prev index next >