4 ms·
Presumably, it just means there needs to be explicit forking of the green thread for cpu bound operations, otherwise everything will run synchronously (because
by louthy 2y ago
Presumably, it just means there needs to be explicit forking of the green thread for cpu bound operations, otherwise everything will run synchronously (because there’s no point where the green thread is paused to wait for an IO IRQ).
That is unless your compiler or JIT injects occasional yields into your synchronous code!
- Rohansi 2y agoAnd that wouldn't be great for performance.
- 01HNNWZ0MV43FF 2y agoThe overhead for epoch stopping like wasm uses can be something like 1%. I did a synthetic test with native code once because I was curious. I think Go also injects yields into its generated code for go routine scheduling
- adgjlsfhk1 2y agoJits already have to do this for GC so it's actually free