diff options
Diffstat (limited to 'base/src')
-rw-r--r-- | base/src/cache.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/src/cache.rs b/base/src/cache.rs index ee13b73..86c2379 100644 --- a/base/src/cache.rs +++ b/base/src/cache.rs @@ -46,7 +46,9 @@ where { let (bucket, location) = cache_location(seed); // we need a lock even if it exists since somebody might be still in the process of writing. - let _guard = CACHE_GENERATION_LOCKS[bucket % CACHE_GENERATION_BUCKET_COUNT].lock(); + let _guard = CACHE_GENERATION_LOCKS[bucket % CACHE_GENERATION_BUCKET_COUNT] + .lock() + .await; let exists = tokio::fs::try_exists(location.path()) .await .context("unable to test for cache file existance")?; |