threading.Semaphore or gevent.lock.Semaphore

Sergey sh0375 at gmail.com
Wed May 24 03:45:39 EDT 2017


Hello,

I'm developing Flask app, processed by gevent.wsgi.WSGIServer.
If I need to isolate some pieces of code inside request handlers, can I use threading.Lock?
If I need semaphore, must I use threading.Semaphore or gevent.lock.Semaphore?
What is the difference between them?

Thank you!



More information about the Python-list mailing list