3 ms·
Newer Go ersions will also preempt green threads on normal functions calls and not only on syscalls. Both is not possible with the JVMs primitives where you nee
by Matthias247 12y ago
Newer Go ersions will also preempt green threads on normal functions calls and not only on syscalls. Both is not possible with the JVMs primitives where you need "cooperative code".
However there exists Quasar for the JVM which seems to be able to emulate something similar to green threads with the help of bytecode weaving (and inserting preemption points).
- jbooth 12y agoOk, fair enough, but if IO isn't happening, who cares if it's a runtime or the OS swapping out the 'thread'?