Skip to content

Documentation is inconsistent about Runtime shutdown behaviour #4231

Closed
@jbg

Description

@jbg

Version
1.13.0 (also Git master)

Platform
n/a

Description
The module-level documentation for tokio::runtime says:

Once Runtime is dropped, all runtime threads are forcibly shutdown. Any tasks that have not yet completed will be dropped.

However, the documentation for tokio::runtime::Runtime::shutdown_timeout says:

[...] dropping a Runtime will wait indefinitely for all tasks to terminate, [...]

This has lead to confusion over the expected behaviour when a Runtime is dropped.

The module-level documentation appears to be accurate; dropping Runtime will not wait for any tasks to terminate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tokioArea: The main tokio crateM-taskModule: tokio/taskT-docsTopic: documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions