Hi,
Item 75 deploys asyncio and coroutines for the Game of Life example. In the final code snippet, we have asyncio.run calls in each iteration of the control loop.
I'm not an expert, but intuitively this seemed strange to me, and it looks like it's an anti-pattern.
Maybe putting the loop into an async function is a better approach?
Hi,
Item 75 deploys asyncio and coroutines for the Game of Life example. In the final code snippet, we have
asyncio.runcalls in each iteration of the control loop.I'm not an expert, but intuitively this seemed strange to me, and it looks like it's an anti-pattern.
Maybe putting the loop into an
asyncfunction is a better approach?