3 ms·
> 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
by rdtsc 16y ago
> 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/ 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.
- denik 16y agoYou should also check out gevent (http://gevent.org http://gevent.org) which is similar to eventlet.
- rdtsc 16y agoThanks 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 ...
- denik 16y agoThere 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.