Virtual threads created more platform threads
Chen Liang
liangchenblue at gmail.com
Wed Jul 2 03:16:39 UTC 2025
Hello, I don't think this would happen for JDK 24 - JEP 491 removed the
code that calls Blocker in Object.wait, which is exactly the goal of that
JEP.
Note that virtual threads are still pinned when call stack goes into
native, as native execution may pass address to stack variables that will
be lost in context switches. In these cases, the traditional managed block
happens again.
P.S. I personally think it is somewhat not responsible for JDK vendors to
ask users to upstream a question for an older JDK release that might no
longer apply on the latest release to a development-oriented mailing list.
On Tue, Jul 1, 2025 at 9:47 PM Jianbin Chen <jianbin at apache.org> wrote:
>
> Hi Loom-dev Community,
>
> I have a question about platform thread creation triggered by calling
> future.get() within virtual threads, and I would like to ask the community
> for assistance. The detailed information can be found in this issue:
> https://github.com/adoptium/adoptium-support/issues/1319. I hope to
> receive some help from the community regarding this matter. Thank you.
> Additionally, I'd like to know if this situation will still occur in JDK
> 24 and above?
>
> Best Regards.
> Jianbin Chen, github-id: funky-eyes
>
>
> Best Regards.
> Jianbin Chen, github-id: funky-eyes
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20250701/1fc49dc4/attachment.htm>
More information about the loom-dev
mailing list