Re: Anyone aware of a LuaJIT FFI-based libevent library?

  • From: Mike Pall <mike-1206@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 6 Jun 2012 21:14:09 +0200

Tim Caswell wrote:
> How else would you implement a non-blocking, single-threaded system without
> C callbacks?  I'm curious.  Maybe bake in co-routines instead?

Make it an iterator on the C side. Alas, no library I know of does
that.

Or just use the system calls directly from the FFI -- all of these
are already iterators (now you know why). Wrapping (say) poll or
epoll isn't that hard.

--Mike

Other related posts: