4 ms·
Well, https://github.com/python-greenlet/greenlet https://github.com/python-greenlet/greenlet has been available for quite some time in Python (gevent probabl
by fabioz 4y ago
Well,
https://github.com/python-greenlet/greenlet https://github.com/python-greenlet/greenlet
has been available for quite some time in Python (gevent probably being its most used flavor).
Note that it it actually predates the async/await approach which was incorporated into the Python language (so, in Python it was implemented as a third-party library -- even async/await had an implementation based on Python 2 using yield and some decorators: https://pypi.org/project/trollius/ https://pypi.org/project/trollius/).
- jpgvm 4y agoYeah I am familiar but using gevent w/monkey-patching is nowhere near the same experience as using Loom. Not to mention that if you patch threading to make it more gevent friendly you can also run into all sorts of fun with locking that wasn't designed for it etc. I really do think Python should have instead adopted gevent as it's async approach instead of asyncio and async/await etc.
- fabioz 4y agoI must say that I definitely don't like the gevent monkey-patching myself -- I prefer to just use the different APIs, although yes, that can end up in a blocking call when there should be none, but that hasn't been a problem I've been bitten by so far -- although it's been a while since I had to use it too ;)