8000 Detect tasks that could disappear mid-execution · Issue #5 · Zac-HD/flake8-async-archive · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Feb 19, 2024. It is now read-only.
This repository was archived by the owner on Feb 19, 2024. It is now read-only.
Detect tasks that could disappear mid-execution #5
@alicederyn

Description

@alicederyn

The docs for asyncio.create_task say:

Save a reference to the result of this function, to avoid a task disappearing mid-execution. The event loop only keeps weak references to tasks. A task that isn’t referenced elsewhere may get garbage collected at any time, even before it’s done.

It's really easy to miss this and try to fire-and-forget. It would be great if flake8-async detected this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0