python - Eventlet vs Greenlet vs gevent? -
i'm trying create gui framework have event-loop. threads handle ui , event handling. i've searched little bit , found these 3 libraries , i'm wondering 1 better use? pros , cons?
i use 1 of these 3 library or create create myself using python threads, or concurrent library.
i appreciate sharing kind of experience, benchmark , comparison.
- you don't want greenlet purpose, because it's low level library on top of can create light thread libraries (like eventlet , gevent).
- eventlet, gevent , more similar libraries provide excellent toolset io-bound tasks (waiting read/write on file, network).
- likely, of gui code wait other threads (at point green/light/os thread irrelevant) finish, perfect target above mentioned libraries.
- all green thread libraries same. try , decide 1 suits project best.
- but it's possible you'll need extract things separate os thread due requirements of os level gui layer.
- considering , better implementation of thread lock in python3 may want stick native
threading
module if application doesn't need hundreds or more threads.
Comments
Post a Comment