pub async fn sessions(sessions: Weak<DashMap<AppId, (InstanceVm, Instant)>>)Expand description
Can be run as a tokio background task to periodically clean the list of active sessions.
Is really quite cancellation-safe.
§Arguments
sessions: TheDashMapof weak sessions. Note that, to avoid memory leaks because its destructor would not be run when this task is cancelled, we assume aWeakreference.
§Returns
Never, unless the referred sessions is free’d.