Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Item 75: asyncio.run in a control loop is an anti-pattern #132

Description

@globalchubby

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.

Image

Maybe putting the loop into an async function is a better approach?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions