Skip to main content

update_system_stats

Function update_system_stats 

Source
pub async fn update_system_stats(
    shared: SharedDescribe,
    locked_machine_stats: Arc<RwLock<MachineStats>>,
) -> Result<()>
Expand description

Async wrapper that can update the system state when passed a locked struct.

Like the D-Bus equivalents in system.rs, the varlink call completes before the write lock is taken so the shared MachineStats lock is never held across a round trip.