Skip to main content

until_cancelled

Function until_cancelled 

Source
pub fn until_cancelled<S>(service: S) -> UntilCancelled<S>
Expand description

Wraps a service so the supervisor cancellation token wins the outer race.

This is the convenient default for long-lived async loops that should stop as soon as the supervisor begins shutdown.