Question Regarding JEP 444: Virtual Threads and Use of ForkJoinPool

Bazlur Rahman anmbrr.bit0112 at gmail.com
Tue Jun 13 23:50:00 UTC 2023


Hello,

I was reading JEP 444, which discusses the implementation of Virtual
Threads. I've observed that the JDK's virtual thread scheduler employs a
work-stealing ForkJoinPool operating in FIFO mode, which is distinct from
the common pool operating in LIFO mode.

This has sparked my curiosity because ForkJoinPool, to my understanding,
has not traditionally been designed to handle I/O-bound tasks. However, the
design of virtual threads seems to be aimed precisely at addressing such
tasks.

Therefore, I'm curious as to why Java has opted to use the ForkJoinPool for
scheduling virtual threads. I would greatly appreciate it if you could shed
some light on what makes this design choice effective in managing I/O-bound
tasks, despite the ForkJoinPool's traditional usage patterns.

Thank you for your time and consideration. I look forward to your insights
on this subject.
* Thank you,*
*-*
*A N M Bazlur Rahman*

---
*"And say: 'My Lord, increase me in knowledge.'" - Quran 20:114.*

*Java Champion*
*Software Engineer*
JUG Leader, JUGBD.org
<https://mailtrack.io/trace/link/331a3fc3a3fa6407b1c1a71207d689d0bc35baca?url=http%3A%2F%2FJUGBD.org&userId=2428395&signature=31820ea85face89b>
Java Queue Editor, InfoQ
<https://mailtrack.io/trace/link/4e67b5f2b63d9a192a80a28578b56f26ab3495b9?url=https%3A%2F%2Fwww.infoq.com%2Fprofile%2FA-N-M-Bazlur-Rahman%2F&userId=2428395&signature=0e89d13e753a8ce2>
Editor at Foojay.io
<https://mailtrack.io/trace/link/ae78bc70831add10a5229ae14321984a51f052eb?url=https%3A%2F%2Ffoojay.io%2Ftoday%2Fauthor%2Fbazlur-rahman%2F&userId=2428395&signature=8a905c0967fa07c1>
About Me
<https://mailtrack.io/trace/link/040f4646e384e62ba0900a14bc61657dbcec43b2?url=https%3A%2F%2Fbazlur.ca%2Fabout%2F&userId=2428395&signature=fc5823af331c641e>
https://bazlur.ca/
<https://mailtrack.io/trace/link/130dee54b46a76f0c11f910de05c700cdda0bb77?url=https%3A%2F%2Fbazlur.ca%2F&userId=2428395&signature=90ba6ea5871c4665>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230613/75bc9794/attachment.htm>


More information about the loom-dev mailing list