When should I use onFork?

Alan Bateman alan.bateman at oracle.com
Tue Aug 19 16:05:36 UTC 2025


On 19/08/2025 16:44, David Alayachew wrote:
> :
>
> However, of all those Joiners I made, not a single one made use of the 
> onFork() method. I never could find a way to use it in a way that 
> onComplete() wouldn't cover.
>
> Can I get some context on it? What is it meant for? And maybe an 
> example of where it is useful in a way that can't easily be done via 
> onComplete()?
>
Ordering and correlation as the onFork method is invoked in fork order.  
Joiner.allSuccessfulOrThrow and Joiner.allUntil are two examples that 
use of it.

-Alan


More information about the loom-dev mailing list