Hacker News new | ask | show | jobs
by trhhowaway232 1040 days ago
I'm glad Java is returning to its original design with userland threads.

Java users can finally have some decent readable concurrent I/O without the blight of reactive.

This is a huge win.

1 comments

That's not what Loom is. It uses a combination of native threading and user threads to create a hybrid mode that gives the benefits of both.
That sounds like Solaris threads, with userspace threads multiplexed on OS threads of course themselves multiplexed onto physical cores?

(https://a.co/d/1XGdjWQ is an Amazon link to Solaris Internals)

Pretty much. The way it is integrated is pretty novel though. It has special cases for the various low level networking APIs which uses the asynchronous versions of said APIs. This lets the threads block in a very efficient way and scale to 1M threads without much overhead.

In general the overhead of a thread is around 1kb compared to the 1mb system thread overhead. That's fantastic.