It’s a slop alright. But it also missed the next mainstream iteration which is Java virtual threads / Goroutines. Those do away with coloring by attacking the root of the problem: that OS threads are expensive.
Sure, it comes with its own issues like large stacks (10k copy of nearly the same stack?) and I predict a memory coloring in the future (stack variables or even whole frames that can opt out from being copied across virtual threads).
I think that Java has a really good solution to offer: Virtual Threads. They share the same interface with native threads and free developers from the burdens of async programming. You only need to take care of some things like accidental thread pinning (through legacy code) and the use of ThreadLocal, but otherwise this complexity is hidden.
Surely by section 7 well be talking (or have talked) about effect systems
It’s a slop alright. But it also missed the next mainstream iteration which is Java virtual threads / Goroutines. Those do away with coloring by attacking the root of the problem: that OS threads are expensive.
Sure, it comes with its own issues like large stacks (10k copy of nearly the same stack?) and I predict a memory coloring in the future (stack variables or even whole frames that can opt out from being copied across virtual threads).
I think that Java has a really good solution to offer: Virtual Threads. They share the same interface with native threads and free developers from the burdens of async programming. You only need to take care of some things like accidental thread pinning (through legacy code) and the use of ThreadLocal, but otherwise this complexity is hidden.
https://docs.oracle.com/en/java/javase/21/core/virtual-threa...