3 ms·
Is there a n:m green threading mode for python? What does gunicorn/gevent do? Sounds like “not that”. Yes best practices and all that, but that really doesn’t
by ryanobjc 7y ago
Is there a n:m green threading mode for python? What does gunicorn/gevent do? Sounds like “not that”.
Yes best practices and all that, but that really doesn’t sound like what’s happening.
- Matthias247 7y agoI don’t know what gevent is doing. But if you have a global interpreter lock then M:N might not be worth it, since only thread will make progress (outside of the syscalls, which are non blocking).
- pas 7y agoPython was always more about breadth than depth. (CPython is full of known inefficiencies, but it's with us since 1989, and basically the core dev who worked most on performance - Victor Stinner - thinks the best way is to introduce subinterpreters - https://github.com/vstinner/talks/blob/master/2019-EuroPython/python_performance.pdf https://github.com/vstinner/talks/blob/master/2019-EuroPytho... ) Oh, that PDF is interesting, Python 3.8 has shared memory for multiprocessing, no more pipe objects between processes. Furthermore extension and internal stuff always had the ability to release the GIL and do its own thing (for example, on a threadpool, or using async/nonblocking I/O). But I have no idea about Gevent. I never liked it. (Just as Twisted/Tornado it was too much magic for too little benefit.)