From 1cf5178ac5ab92d2e6100b12a874356be94e35ba Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 2 Jan 2020 11:00:33 +0100 Subject: [PATCH] src/backup/datastore.rs: new helper try_shared_chunk_store_lock() --- src/backup/datastore.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backup/datastore.rs b/src/backup/datastore.rs index 7aef844c..7e1861ce 100644 --- a/src/backup/datastore.rs +++ b/src/backup/datastore.rs @@ -291,6 +291,10 @@ impl DataStore { Ok(()) } + pub fn try_shared_chunk_store_lock(&self) -> Result { + self.chunk_store.try_shared_lock() + } + pub fn chunk_path(&self, digest:&[u8; 32]) -> (PathBuf, String) { self.chunk_store.chunk_path(digest) }