Skip to content

Docs for task::spawn must mention support for tasks that block #905

Closed
@jimblandy

Description

@jimblandy

The async-std blog post "stop worrying about async blocking" explains that spawn_blocking is no longer needed, and that developers should simply use spawn instead and let the library decide whether it should keep the thread in the async pool.

If task::spawn is the recommended way to spawn tasks that may block, then users will write code that depends on that, and the design decision becomes something async-std can't revert without introducing bugs in its users. This is all fine (it seems like a good design to me), but non-obvious characteristics covered by async-std's stability guarantees should be documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions