Skip to main content

report_status_events

Function report_status_events 

Source
pub(crate) async fn report_status_events(
    runtime: impl SleepProvider,
    inner: Weak<Mutex<GuardMgrInner>>,
    events: UnboundedReceiver<Msg>,
)
Expand description

Background task: wait for messages about guard statuses, and tell a guard manager about them. Runs indefinitely.

Takes the GuardMgrInner by weak reference; if the guard manager goes away, then this task exits.

Requires a mpsc::Receiver that is used to tell the task about new status events to wait for.