Skip to content

Use the new task monitor for long-lived background jobs #6098

@bnjbvr

Description

@bnjbvr

#6075 adds a mechanism to watch background jobs spawned with tokio::spawn that have failed (either with a panic, or with a Result::Err). The same PR introduced its usage in the event cache, but we should expand it to more places in the SDK, i.e. for every background task.

This is rather mechanical, and requires a bit of thought for each case. In particular, if a job is spawned in the background but awaited immediately, it should not use this mechanism; this is really for jobs that ought to live ~forever until the program dies (or aborted in rare cases).

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