Ephemeral threads

Alan Bateman alan.bateman at oracle.com
Fri Jan 9 09:33:46 UTC 2026


On 08/01/2026 17:48, Alex Miller wrote:
>
> Given where things stood at Java 21 time and where we are now, can we 
> move the idea of ephemeral thread support forward? This is very 
> important to us and we are happy to get involved with the process and 
> contribute if that would be helpful.
>

The possibility of GC'ing a started thread before it terminates is a 
scary topic. It interacts with many areas and gets really scary once you 
bring phantom refs, cleaners, and finalizers into the discussion.

For these so-called "forgotten sender" and "abandoned receiver" cases 
then it might be more interesting to see how they could be work with 
structured concurrency. Right now, the first API is focused on fan-out 
scenarios but in time we would like to have it work with channel like 
constructs too. I suspect this will be closer to what you are interested in.

-Alan










-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20260109/3ced835b/attachment.htm>


More information about the loom-dev mailing list