News for hackers. Stuff that matters.
Re:A viable solution for Python concurrency by tbabb on Friday October 15, 2021 @08:16PM (#28884541)
> If you do anything on the CPU or if you have any I/O which is not async you stall the event loop and everything grinds to a halt.

But that's always going to be the case for single threaded code. If you're ready to use threads, then that integrates pretty seamlessly with asyncio by using an executor task.

> asyncio doesn't give us any tools to protect the event loop from getting stalled by your code

Again, check out executors: https://docs.python.org/3/library/asyncio-eventloop.html#asy...

Asyncio in Python and JS are very different beasts.

There are no comments on this comment yet.