[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua
- From: Josh Simmons <simmons.44@...>
- Date: Tue, 6 Dec 2011 10:36:37 +1100
On Tue, Dec 6, 2011 at 10:07 AM, Tony Finch <email@example.com> wrote:
> Tim Caswell <firstname.lastname@example.org> wrote:
>> For both luvit and nodejs, the main loop is libuv. I'm not sure if
>> it's possible to share a loop, but it would be a neat experiment for
>> someone (not me) to try.
> Arguably not - see http://www.infoq.com/presentations/Simple-Made-Easy
> especially starting after 47 minutes, but the whole talk is brilliant.
>> The only way I can imagine node and luvit working together is with
>> multiple processes and message passing through some common IPC.
> That is basically the point of isolates in V8 / Dart.
> f.anthony.n.finch <email@example.com> http://dotat.at/
> Dover, Wight, Portland: West 5 to 7. Moderate or rough, occasionally very
> rough in Portland. Squally showers. Good.
The library could easily let you use your own event system by giving
you access to its descriptors along with a method to indicate when a
set becomes hot. Even better with epoll at least, you can epoll on an
epoll descriptor, so the library could maintain its own descriptors
and give you access to its master descriptor which you could then poll
independently. Both these methods could be supported with a single
Not sure how well this would adapt to weirder schemes like IOCP or
more basic schemes like select but to me at least it's the only way to
intelligently join two or more event based libraries without ending up
with a busy loop bouncing around between multiple event notification