add asyncio guide for Free-Threaded Python#150456
Conversation
Documentation build overview
6 files changed ·
|
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
When you're done making the requested changes, leave the comment: |
| multi-threaded environment. | ||
|
|
||
| Combining asyncio with threads is most useful when you want to scale | ||
| I/O-bound work across multiple CPU cores by running an event loop per |
There was a problem hiding this comment.
Maybe I don't know enough about asyncio: why would I/O-bound work need multiple cores in order to scale?
There was a problem hiding this comment.
One core may handle multiple requests concurrently but not in parallel, with multiple cores you can handle them in parallel.
There was a problem hiding this comment.
I guess you mean the computation required by the requests once the IO is complete? One core with asyncio can make progress on the IO itself in parallel. Or am I misunderstanding. I don't mean to pick at this too much, but I think this particular point can be a source of confusion, and it would be stellar to concisely explain it here.
No description provided.