2 ms·
Green threads have been around for a very long time before Go, and there's nothing specific about Go that made them solve any problem they didn't solve before.
by int_19h 7y ago
Green threads have been around for a very long time before Go, and there's nothing specific about Go that made them solve any problem they didn't solve before. It just so happens that this is a solution that comes with many downsides, which is why it's not universally adopted.
Indeed, Java itself had green threads (only!) in the first couple of versions.
- pron 7y agoIts downsides depend on the language. It works better in languages with GC than languages without, and it works better in languages that rarely rely on FFI than in languages that rely on it a lot. One of its major "downsides" is that it's just harder to implement than async/await, and requires control over the backend, something few languages have (even Rust is on top of LLVM). For example, Koltin just couldn't implement useful usermode threads because it has no control over the JDK.