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

Michal Domagala outsider404 at gmail.com
Thu Aug 1 10:01:28 UTC 2024


> Finally, I don’t understand why you’re bothered by any of this. If you’re
> interested in observing all of your threads, then they will not be
> collected. Others may use virtual threads in a different way, have millions
> of them, and would prefer that the memory of those threads that can no
> longer have any effect would be collected just like any other Java object.
> You do and will have a choice.
>

Choice is flexibility what is good, but choice is also complexity, what is
bad. Simpler system can be better than flexible system.

In current case choice is not well designed IMHO. When you choice to enable
observability, you risk memory leak. Well designed observability should be
safe for application.

Finally, choice is choice when if fair. Now choice is not undocumented and
commonly unknown
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20240801/4be62b55/attachment-0001.htm>


More information about the loom-dev mailing list