Dropped task -- feature or bug?
Brian S O'Neill
bronee at gmail.com
Mon May 16 19:02:10 UTC 2022
I wouldn't necessarily need full tracking behavior to debug the issue.
When the virtual thread is blocked, I can find my task in a heap dump,
referred to by a continuation object. Regardless, is the current
behavior a feature, a bug, or is it just a strange anomaly that needs to
be documented?
On 2022-05-16 11:08 AM, Ron Pressler wrote:
> Even if the thread wasn’t gc’ed, you wouldn’t have been able to debug that thread, as virtual threads are not tracked by default. If you want a virtual thread to be tracked for debugging/monitoring purposes, it needs to be started in some “container”, such as the ExecutorService returned from Executors.newVirtualThreadPerTask(). In that case, it will also not be gc-ed.
>
> — Ron
More information about the loom-dev
mailing list