Function run_periodic

Source
pub(crate) async fn run_periodic<R: SleepProvider>(
    runtime: R,
    inner: Weak<Mutex<GuardMgrInner>>,
)
Expand description

Background task to run periodic events on the guard manager.

The only role of this task is to invoke GuardMgrInner::run_periodic_events from time to time, so that it can perform housekeeping tasks.

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