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

Michal Domagala outsider404 at gmail.com
Thu Aug 1 09:48:44 UTC 2024


>
>
>
> one might ask why the queue became unreachable without extra
> communication, eg via interrupting the thread. You'd need to elaborate more
> why that would be a perfectly good concurrent system, not just puzzle over
> the contrived example
>

Answer is quite simple:  queue became unreachable without extra
communication because I want avoid extra communication, eg via interrupting
the thread.
I want producer and consumer be loosely coupled. They are connected only by
blocking queue. When queue must be unreachable, it is enough that someone,
for example consumer, producer or third actor makes the queue null. After
that queue as well as consumer are GC'able

All extra communication overhead is that producer must verify if
*current *queue
is not null
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20240801/3fba7907/attachment.htm>


More information about the loom-dev mailing list