Eventlet vs Greenlet vs gevent?

  • You definitely don’t want greenlet for this purpose, because it’s a low level library on top of which you can create light thread libraries (like Eventlet and Gevent).
  • Eventlet, Gevent and more similar libraries provide excellent toolset for IO-bound tasks (waiting for read/write on file, network).
  • Likely, most of your GUI code will wait for other threads (at this point green/light/OS thread is irrelevant) to finish, which is a perfect target for above mentioned libraries.
  • All green thread libraries are mostly the same. Try all and decide which one suits your project best.
  • But also it’s possible that you’ll need to extract some things into a separate OS thread due to requirements of OS level GUI layer.
  • Considering that and better implementation of thread lock in Python3 you may want to just stick with native threading module if your application doesn’t need hundreds or more threads.

Leave a Comment

tech