[concurrency-interest] ForkJoin refresh

Doug Lea dl at cs.oswego.edu
Fri Feb 7 08:54:05 EST 2020


On 2/6/20 10:56 AM, Peter Levart wrote:
> 
> If stray interrupts are not problematic, then what about the race that 
> causes a missing interrupt at the start of execution of the task:

Thanks; I agree. It suffices to just recheck status. (The outcome of
CancellationException will be reported without needing to throw it here.)

1436             public final boolean exec() {
1437                 Thread.interrupted();
1438                 runner = Thread.currentThread();
1439                 try {
+                      if (!isDone())
1440                     result = callable.call();
1441                     return true;




More information about the Concurrency-interest mailing list