4 ms·
It seems like a step backward. Dealing with callbacks manually is an unnecessary hassle compared to being able to use "green threads". See python gevent and ngx
by cmwelsh 13y ago
It seems like a step backward. Dealing with callbacks manually is an unnecessary hassle compared to being able to use "green threads". See python gevent and ngx_lua for examples of people doing things this way.
- someone13 13y agoCheck out Luv - an attempt to use Lua's coroutines to do green threads/fibers, integrated with libuv. https://github.com/richardhundt/luv https://github.com/richardhundt/luv
- kodablah 13y agoluv does a fantastic job of sticking with Lua coroutines. The master branch still has zeromq in it, but the latest work is done in the ray branch. Sadly, it doesn't seem the project is moving, so most of the libuv features are not yet implemented the "ray" way. Edit: Seems ray does have most of libuv features, sorry.
- anonymoushn 13y agoand node-fibers :o
- chubot 13y agoYeah I never really understood luvit. Callbacks make sense in JavaScript because it doesn't have coroutines. But Lua has coroutines! So why does luvit use callbacks? It does seem like a step backward.
- ufo 13y agoHistorical reasons. The guy who wrote luvit knew NodeJS but didnt know Lua when he started working on it.