You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When inside a FIber f1, some code is using FiberAsync.runBlocking(), and then I call f1.cancel(true), shouldn't the thread executing the blocking code be interrupted?
Currently I feel like FiberAsync.runBlocking() itself throws an InterruptedException, but its thread is not interrupted…
I tried to adapt one of the quasar unit test for my use case to show in more details what I mean:
java.util.concurrent.ExecutionException: java.lang.InterruptedException
at co.paralleluniverse.fibers.Fiber.get(Fiber.java:1372)
at co.paralleluniverse.fibers.Fiber.join(Fiber.java:1343)
at org.ow2.petals.cockpit.server.QuasarTest.testCancel1(QuasarTest.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.InterruptedException
at co.paralleluniverse.fibers.FiberAsync.run(FiberAsync.java:142)
at co.paralleluniverse.fibers.FiberAsync.runBlocking(FiberAsync.java:409)
at org.ow2.petals.cockpit.server.QuasarTest$1.run(QuasarTest.java:29)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:44)
at co.paralleluniverse.strands.SuspendableUtils$VoidSuspendableCallable.run(SuspendableUtils.java:32)
at co.paralleluniverse.fibers.Fiber.run(Fiber.java:1072)
at co.paralleluniverse.fibers.Fiber.run1(Fiber.java:1067)
at co.paralleluniverse.fibers.Fiber.exec(Fiber.java:767)
at co.paralleluniverse.fibers.FiberForkJoinScheduler$FiberForkJoinTask.exec1(FiberForkJoinScheduler.java:266)
at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.doExec(ParkableForkJoinTask.java:117)
at co.paralleluniverse.concurrent.forkjoin.ParkableForkJoinTask.exec(ParkableForkJoinTask.java:74)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
The text was updated successfully, but these errors were encountered:
Hi,
When inside a
FIber f1
, some code is usingFiberAsync.runBlocking()
, and then I callf1.cancel(true)
, shouldn't the thread executing the blocking code be interrupted?Currently I feel like
FiberAsync.runBlocking()
itself throws anInterruptedException
, but its thread is not interrupted…I tried to adapt one of the quasar unit test for my use case to show in more details what I mean:
Currently, it gives me the following error:
The text was updated successfully, but these errors were encountered: