[External] : Re: Virtual thread memory leak because TrackingRootContainer keeps threads

Attila Kelemen attila.kelemen85 at gmail.com
Wed Jul 3 15:04:39 UTC 2024


Maybe Ron will prove me wrong, but I never felt that the design of the JEP
was meant to make VT appear as PT in all aspects. In fact, what the JEP is
usually about is that it equates VT with tasks submitted to an executor.
And in that case, VT being a GC root is a strange thing. Though I think
either case is unlikely to make a difference in practice.

robert engels <rengels at ix.netcom.com> ezt írta (időpont: 2024. júl. 3.,
Sze, 16:58):

> I understand, but with a PT thread being a GC, and methods like
> Thread.enumerate() is was never possibly - and a “service” could always
> find the “blocked” threads and interrupt them.
>
> If VT are not findable (or optionally findable), I think it is a breaking
> change which goes against the JEP design for virtual threads, and it is
> going to lead to two different types of patterns for queue handling based
> on the thread types involved - I think this is a very bad idea.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20240703/66afb8e6/attachment-0001.htm>


More information about the loom-dev mailing list