4 ms·
If you need to do CPU bound computations use a thread pool.
by jordic 6y ago
If you need to do CPU bound computations use a thread pool.
- vazamb 6y agoWhy this being downvoted: You need to use a process pool in Python, thread pools are for I/O bound tasks and cannot use more than 1 core.
- nemothekid 6y agoI didn't downvote him, but his response isn't at all relevant to what was being discussed. I was discussing the API design of asyncio and how they had to add the "loop" parameter to ensure the reactor would be thread safe by default.