doc: why tokio mutex instead of std mutex

This commit is contained in:
Joonas Koivunen
2023-03-28 14:14:14 +03:00
parent 18ed0f9a06
commit b1d54024e7

View File

@@ -288,6 +288,7 @@ pub async fn disk_usage_eviction_task_iteration_impl<U: Usage>(
usage_pre: U,
cancel: &CancellationToken,
) -> anyhow::Result<IterationOutcome<U>> {
// use tokio's mutex to get a Sync guard (instead of std::sync::Mutex)
let _g = state
.mutex
.try_lock()