When should I use onFork?

David Alayachew davidalayachew at gmail.com
Wed Aug 20 06:17:08 UTC 2025


Beautiful, ty vm Alan. So, something simple like being able to index the
subtasks. Makes a lot of sense, ty vm.

On Tue, Aug 19, 2025 at 12:05 PM Alan Bateman <alan.bateman at oracle.com>
wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20250820/813fe422/attachment-0001.htm>


More information about the loom-dev mailing list