You can run a blocking function in asyncio via the asyncio.to_thread() function. In this tutorial, you will discover how to execute blocking functions in new threads separate from the asyncio event loop. Let’s get started. The problem with Blocking the Event Loop A problem with asyncio is that if a blocking call is executed in […]
Published on November 28, 2022 10:00