use of co.paralleluniverse.fibers.Fiber in project quasar by puniverse.
the class InstrumentationOptimizerTest method testSkipForwardsWithLoopAfter.
@Test
public void testSkipForwardsWithLoopAfter() throws InterruptedException, SuspendExecution, ExecutionException {
new Fiber(new SuspendableRunnable() {
@Override
public void run() throws SuspendExecution, InterruptedException {
skipForwardsWithLoopAfter();
}
}).start().join();
assertTrue(isOptimized("skipForwardsWithLoopAfter"));
}
use of co.paralleluniverse.fibers.Fiber in project quasar by puniverse.
the class InstrumentationOptimizerTest method testSkipForwardsToSuspendableLong.
@Test
public void testSkipForwardsToSuspendableLong() throws InterruptedException, SuspendExecution, ExecutionException {
new Fiber(new SuspendableRunnable() {
@Override
public void run() throws SuspendExecution, InterruptedException {
skipForwardsToSuspendableLong();
}
}).start().join();
assertTrue(isOptimized("skipForwardsToSuspendableLong"));
}
use of co.paralleluniverse.fibers.Fiber in project quasar by puniverse.
the class InstrumentationOptimizerTest method testDontSkipForwardsWithLoop.
@Test
public void testDontSkipForwardsWithLoop() throws InterruptedException, SuspendExecution, ExecutionException {
new Fiber(new SuspendableRunnable() {
@Override
public void run() throws SuspendExecution, InterruptedException {
dontSkipForwardsWithLoop();
}
}).start().join();
assertFalse(isOptimized("skipForwardsWithLoop"));
}
use of co.paralleluniverse.fibers.Fiber in project quasar by puniverse.
the class InstrumentationOptimizerTest method testSkipForwardsWithMethodAfter.
@Test
public void testSkipForwardsWithMethodAfter() throws InterruptedException, SuspendExecution, ExecutionException {
new Fiber(new SuspendableRunnable() {
@Override
public void run() throws SuspendExecution, InterruptedException {
skipForwardsWithMethodAfter();
}
}).start().join();
assertTrue(isOptimized("skipForwardsWithMethodAfter"));
}
use of co.paralleluniverse.fibers.Fiber in project quasar by puniverse.
the class InstrumentationOptimizerTest method testSkipForwardsToSuspendableInt.
@Test
public void testSkipForwardsToSuspendableInt() throws InterruptedException, SuspendExecution, ExecutionException {
new Fiber(new SuspendableRunnable() {
@Override
public void run() throws SuspendExecution, InterruptedException {
skipForwardsToSuspendableInt();
}
}).start().join();
assertTrue(isOptimized("skipForwardsToSuspendableInt"));
}
Aggregations