pub async fn update_system_stats(
connection: Connection,
locked_machine_stats: Arc<RwLock<MachineStats>>,
) -> Result<()>Expand description
Async wrapper than can update system stats when passed a locked struct
The D-Bus call runs before the write lock is taken (not while holding it):
locked_machine_stats is shared by every collector, so holding it across an
awaited D-Bus round trip would block every other collector’s own (already
finished) write until this one’s D-Bus call completes.