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.

Discourage using fire-and-forget approach for creating new tasks #399

@asvetlov

Description

@asvetlov

Recently I saw several questions on StackOverflow about complaining: asyncio swallows a raised exception when a code is executed inside new task.

I could collect exact links to SO issues but the problem is obvious: newbies are tending to create a new task but never do await task at the end.

As result exceptions raised by a task are not displayed at all.

PYTHONASYNCIODEBUG=x definitely helps to find a not awaited (aka not joined if you are prefer threading terms) task but the doc is not clear about the issue.

Maybe warning section for loop.create_task doc will help but I honestly have no idea how write the warning text.

Suggestions?

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