Skip to content

Find "dangerous" blocking constructs in async contexts (.wait(), block_on, etc.) #4427

Open
@emk

Description

@emk

This is related to #4377, which proposed warning about blocking operations like println! inside an async context. That is definitely a promising idea, but it's also very ambitious, because almost anything could block.

But there's also a specific set of blocking constructs that can potentially deadlock the entire tokio (or other) runtime. These include things like calling block_on or .wait inside an async context. There are easy to include by mistake when converting non-async code to async. And there are fewer of these dangerous calls, which would make them easier to lint for.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsT-async-awaitType: Issues related to async/await

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions