: Re: Project Loom VirtualThreads hang
Alan Bateman
Alan.Bateman at oracle.com
Fri Jan 6 10:08:40 UTC 2023
On 06/01/2023 09:42, Arnaud Masson wrote:
>
> A long CPU-bound request (without any IO/yield) on a vthread would
> virtually “pin” its native thread, which is a thing we don’t generally
> want, no?
>
> (A server can have both CPU-bound and IO-bound requests at the same time.)
>
> That would be a bit like blocking the even loop on NodeJS:
> https://nodejs.org/en/docs/guides/dont-block-the-event-loop/#blocking-the-event-loop-json-dos
> (mitigated by the fact there are more than 1 native thread to run
> vthreads in general).
>
> Wouldn’t vthread preemptive scheduling fix that?
>
>
Maybe but it needs a lot more real world usage of virtual threads to see
if this is really needed. As Ron mentioned, custom schedulers on the
list to re-visit and that may where the primitive to force preempt is
exposed and allow people to experiment with time sharing if they want.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230106/44cda43d/attachment-0001.htm>
More information about the loom-dev
mailing list