Skip to main content

spawn_owned

Function spawn_owned 

Source
pub fn spawn_owned(
    tag: &'static str,
    fut: impl Future<Output = ApiResult<()>> + 'static,
)
Expand description

Spawn a fire-and-forget task whose ERRORS ARE OWNED: a failure lands in a tracing::error tagged with tag instead of a dangling Promise rejection (which ApiFuture::spawn produces, invisibly to callers and tests). “View already deleted” cancellations are not failures.

Prefer RETURNING the future so the caller owns completion and error (invariant I6); use this only at event-listener leaves where no caller exists.