3 ms·
I think the section is addressing both CPU and IO-bound tasks: > How to Execute a Blocking I/O or CPU-bound Function in Asyncio? But to be precise, we should
by wrigby 4y ago
I think the section is addressing both CPU and IO-bound tasks:
> How to Execute a Blocking I/O or CPU-bound Function in Asyncio?
But to be precise, we should differentiate between Python’s interpreter threads and OS threads. In general, OS threads are a great way to parallelize CPU-bound tasks (with the issues of locking you mention), but Python’s interpreter threads are not (because of the GIL).