Re:Project Loom and Structured Concurrency
by anonymousDan on Friday December 04, 2020 @11:42AM
(#25304402)
So how does it actually execute the system call under the hood? Using some kind of background OS thread pool?
[ Parent
| on HN ]
Re:Project Loom and Structured Concurrency
by Cojen on Friday December 04, 2020 @12:20PM
(#25305025)
From what I can tell, async system calls are used whenever possible. A blocking call on a socket doesn't make a blocking system call, thus permitting the carrier OS thread to go do something else. As for file I/O, things are a bit messy. Older linux kernels don't support "true" async file I/O, and the Java NIO async file channels do use thread pools to emulate async behavior in that case.