News for hackers. Stuff that matters.
[deleted]
Re:Diesel 2: Using generators for async (and back again) by rdtsc on Tuesday August 10, 2010 @05:01PM (#1592947)
> This looks a lot like monocle (Python) and async.js (JavaScript), which do the same thing.

Actually Diesel used to be more like monocle using yields. But the point of the article was that they re-wrote Diesel to use greenlet in Diesel 2. It is a rather different approach. Yes, underneeth they all have a select/poll/epoll event loop but greenlet is a lot cleaner approach for some use cases.

I use eventlet (http://eventlet.net/) which sits on top of greenlet. So far, I am very satisfied with it. I moved to it from Twisted. It felt like moving from Java back to Python.

Re:Diesel 2: Using generators for async (and back again) by denik on Wednesday August 11, 2010 @01:45AM (#1593956)
You should also check out gevent (http://gevent.org) which is similar to eventlet.
Re:Diesel 2: Using generators for async (and back again) by rdtsc on Wednesday August 11, 2010 @11:09AM (#1594903)
Thanks Denis gevent is sweet, I monitor the project and might switch to it one day.

As of now I still use some of the eventlet-only features like thread pools and subprocess handling. Performance has not been a problem yet as well. I imagine gevent is faster since it sits on top of libevent ...

Re:Diesel 2: Using generators for async (and back again) by denik on Wednesday August 11, 2010 @12:18PM (#1595116)
There are contributions on the mailing list of threadpool and subprocess handling. But you're right this should be in the library - we're working on it.