[concurrency-interest] cancellation of ForkJoinTask

Denys Geert gdenys at yahoo.com
Fri May 7 09:14:26 EDT 2010


Hi,

>From my observations, when canceling a top-level recursive task submitted to FJ, the thread that called FJPool.invoke is unblocked quite rapidly, but the task and its child tasks keep on executing in the FJ pool (even forking and joining new child tasks).

Although the cancellation has the effect of unblocking the invoker, it seem all of the work is still performed, as if cancellation was never requested.

The behavior of the cancellation seems weird and not very helpful. An alternative would be to shut the FJ pool down, but that would prevent reuse of the pool among tasks.

Thanks for any info,
Geert.


      


More information about the Concurrency-interest mailing list