Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

100% CPU on asyncio.sleep(0) #398

@dbivolaru

Description

@dbivolaru

A very interesting thing i am looking at is the fact that this code is using 100% CPU.

while True:
    await asyncio.sleep(0)

I believe this should not be the case as it means the only way to avoid it is to use a non-zero constant like sleep(0.0001) or sleep(0.01) in the case PYTHONASYNCIODEBUG=1.

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