From a2ef3f6ec4c830611fde1a2e935588ccbbc61c03 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 30 Apr 2025 10:47:54 +0200 Subject: config works --- cache/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cache/src') diff --git a/cache/src/lib.rs b/cache/src/lib.rs index 2d2cfa3..2d31d6c 100644 --- a/cache/src/lib.rs +++ b/cache/src/lib.rs @@ -35,13 +35,14 @@ pub struct Config { max_in_memory_cache_size: usize, } +pub static CONF_PRELOAD: std::sync::Mutex> = std::sync::Mutex::new(None); static CONF: LazyLock = LazyLock::new(|| { CONF_PRELOAD - .blocking_lock() + .lock() + .unwrap() .take() .expect("cache config not preloaded. logic error") }); -static CONF_PRELOAD: Mutex> = Mutex::const_new(None); #[derive(Debug, Encode, Decode, Serialize, Clone)] pub struct CachePath(pub PathBuf); -- cgit v1.2.3-70-g09d2