I've talked before about how asyncio is limited to one coroutine execution at a time. Additionally, CPU-intensive operations will block the asyncio event loop causing other coroutines to be blocked from executing.
To get around this, you can use a thread pool or process pool executor. Use a thread pool when you can't serialize data between processes AND the synchronous code you're running is network bound. For CPU-bound code, use a process pool.
A process pool executor works the same way as a thread pool except that you're not limited by the GIL. This makes it the perfect solution for complex computation and other CPU-intensive code. The downside is that any variables passed to the separate process must be serializable.
Follow me for more #asyncio tips, tricks, and explanations!