Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I remember they were talking about Green Threads 20 years ago. Is it something new?


Yes, while green and red threads were an implementation detail not exposed to Java programmers, now both thread models are exposed (Threads and Virtual Threads).

Additionally since virtual threads are exposed across the whole runtime and standard library, not only they are built on top of native threads (red), the developers have control over their scheduling.


Yes - green threads at the time were basically a solution to a hardware limitation.

Virtual threads make blocking IO calls automagically non-blocking, allowing for better utilization of the CPU.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: