Is gevent's cooperative multitasking needed for a uvicorn ASGI server? #1994
Replies: 2 comments 2 replies
-
Hi @chrisinmtown, Your code will still need to be cooperative to benefit from the threads. Note that Python threads run concurrently, not in parallel. One way to make your code cooperative is by using |
Beta Was this translation helpful? Give feedback.
2 replies
-
It doesn't appear to work tho, I started a new discussion: #1998 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My Connexion V2 app used the following lines in
__init__.py
to allow multiple requests to be processed in parallel:For example, if one request has to perform a big messy database join, then another request (or 100) could be processed while that first one is cooking along.
Please comment, what's the right way to enable similar behavior in Connexion V3? I see this note in the migration guide:
Does this mean as many as 10 requests will automagically be processed in parallel, even without monkey-patching in any
gevent
cooperative multi-tasking code?Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions