4 ms·
I remember they were talking about Green Threads 20 years ago. Is it something new?
by zerr 3y ago
I remember they were talking about Green Threads 20 years ago. Is it something new?
- pjmlp 3y agoYes, 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.
- kaba0 3y agoYes - 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.