Loom Evades Exception Handling

Alan Bateman Alan.Bateman at oracle.com
Fri Nov 26 07:53:18 UTC 2021


On 25/11/2021 22:25, forax at univ-mlv.fr wrote:
> :
> For Alan or Ron, fork() should throw an exception if called after join() ?
It's good to look at examples like this. On first glance then it may be 
trying to be a bit too clever, or maybe lazy execution is just subtle 
sometimes.

The API could be changed so that join is "joinAndShutdown" but it is 
already a very limited API. There will be cases where someone will want 
to catch InterruptedException and continue after join. There will be 
other cases where jounUntil will be used to stagger forks. A more 
limited check would be detecting that join has been called without fork 
but there again, there will be cases where an exception would be 
annoying. So I think we'll need to mull on this a bit to see if further 
seat belts would be help or hindrance.

-Alan


More information about the loom-dev mailing list