10 ms·
Also, the event loop seems work well with these fun hardware projects
by reustle 13y ago
Also, the event loop seems work well with these fun hardware projects
- drdaeman 13y agoYou can have event loop in any language that has enough access to underlying OS facilities (select/poll/epoll/kqueue) out there. Can't name a non-esoteric language where you can't off the top of my head.
- cliffbean 13y agoIt's not just a theoretical question about whether a particular language is capable of supporting an efficient event loop. It's also a significantly practical question about whether there are a large number of libraries and community experience built up around programs organized this way. This is also one of the big reasons why the people who wrote node.js picked JavaScript in the first place [0]. [0] http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf
- drdaeman 13y agoAny reason large number of libraries should even know about they're using evented/async IO? I believe most of them consist of purely sequential actions (say, "connect then send then receive then process then return") and gain no benefit from non-blocking (function-wise, not program-wise) IO. If the core is smart enough to run them as coroutines (for example see Python's gevent.monkey) that yield back to event loop on waiting for IO, they'll automagically do the right thing without being infested with CPS callback ladder hell.