3 ms·
I'm surprised there was no mention of implementing Lua's coroutines via Go's goroutines.
by wavemode 1y ago
I'm surprised there was no mention of implementing Lua's coroutines via Go's goroutines.
- shadowgovt 1y agoThat feels not quite correct. Lua coroutines aren't separate threads and trying to farm them out to goroutines (which are separate threads) risks violating expectations you can assume with non-concurrent execution. With coroutines, you can fairly believe that your state isn't going to change when you're running until you yield.