3 ms·
Shameless plug: http://25thandclement.com/~william/projects/cqueues.html http://25thandclement.com/~william/projects/cqueues.html 0-dependency Lua module which
by wahern 12y ago
Shameless plug: http://25thandclement.com/~william/projects/cqueues.html http://25thandclement.com/~william/projects/cqueues.html
0-dependency Lua module which manages event polling using epoll/kqueue/Solaris ports. It eschews callbacks in favor of Lua coroutines.
What makes it relevant here is that is also provides a built-in condition variable type which allows you to wakeup coroutines directly. The included promise/future module is all Lua, utilizing the condition variable support. No tricks with eventfd or a pipe, which wouldn't work well, anyhow.