gunicorn
gunicorn copied to clipboard
asyncio synchronization primitives
Hi, I have quick question.
I use gunicorn with uvicorn.workers.UvicornWorker and would like to protect some resources from shared access.
Could I use asyncio.Lock for that? The documentation said it's not thread-safe, but how is it related to gunicorn workers? My understanding is one such worker is like one thread, so with --workers 1 asyncio.Lock will work, but in other case not. Am I right?
so,i am
you should ask directly in the uvicorn project :)