Skip to content

Add support for aborting sub-tasks #1100

Open
@danlaine

Description

@danlaine

If we spawn a task (e.g. with spawn_ref), and that task spawns sub-tasks, and we drop/abort the parent task, the child sub-tasks aren't aborted. This can lead to unexpected behavior.

For example, a p2p::authenticated::Network spawns sub-tasks for the tracker, router, etc.. Aborting the network handle doesn't stop these tasks, meaning that for most intents and purposes the network is still running.

We should have a mechanism in the runtime to enable aborting of sub-tasks when the parent task is aborted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions