lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 
> I'm not by any means an expert on event libraries, but it seems like a
> wheel that keeps getting re-invented and most of said re-inventions
> are in C/C++. Redis have their own, Luv and Node.js and Luvit have
> libuv, Ruby has Event Machine and I think Perl has AnyEvent and half a
> dozen others plus Coro for coroutines.

There's a funny little coincidence there. Marc Lehmann wrote libev while
working on Coro for Perl. That's right same guy (he also wrote AnyEvent
but that's just a wrapper which tries to detect which event loop you
happen to have installed and use that).

Now here's the punch line - the first thing anybody ever did with
libev is use it in combination with a coroutine scheduler. We now
have libuv and The-Project-Formerly-Known-As-Luv so we're full
circle again.

I'm cheating though. I was basically "there" when Coro happened,
filing bug reports and prodding for features, so I'm obviously
biased heavily towards that kind of solution.

Happily, I don't actually have to _implement_ the coroutines as he
did. I have Lua! I had to mention Lua at least once, otherwise this
discussion is getting hopelessly off topic :)