3 ms·
The code features some extensive use of coroutines: https://github.com/kingluo/luajit.io/blob/master/lib/ljio/socket/tcp.lua#L23 https://github.com/kingluo/luaj
by espadrine 12y ago
The code features some extensive use of coroutines: https://github.com/kingluo/luajit.io/blob/master/lib/ljio/socket/tcp.lua#L23 https://github.com/kingluo/luajit.io/blob/master/lib/ljio/so...
I wonder how nice they are to use compared to threads, or even to node-style CPS.
- adrusi 12y agoIt's basically the same as fibers in node. Also quite similar to goroutines running on just one cpu.
- charliesome 12y agoAnd also quite similar to kernel threads
- felixgallo 12y agoNot at all like kernel threads, which are preemptive and in kernel space.