On Thu, 30 Nov 2023 20:44:33 GMT, Alex Menkov <amen...@openjdk.org> wrote:

> I'm not sure I understand the scenario. The state is set to TERMINATED after 
> the thread completes its execution.
> So a virtual thread was scheduled, mounted, did some work (as state != NEW) 
> and then scheduler unmounts it and decides to not schedule it again and just 
> "loses" it?
> This does not look like a real scenario for me, but anyway I think that's 
> fine to report such unreachable virtual threads until GC collects the objects.

I wasn't thinking in terms of the scheduler somehow no longer references the 
virtual thread, but instead the program no longer referencing the scheduler 
(and also not referencing the virtual thread).

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16665#issuecomment-1834565906

Reply via email to