When should I use onFork?

David Alayachew davidalayachew at gmail.com
Tue Aug 19 15:44:09 UTC 2025


Hello @loom-dev <loom-dev at openjdk.org>,

I've been enjoying the Structured Concurrency API lately, and made many
many custom joiners to meet my needs -- over 40 of them!

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()?

Thank you for your time and help.
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20250819/931b61af/attachment.htm>


More information about the loom-dev mailing list