From 7877f7caa3535a7c477c911ddeafdf5bb14ebc14 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Fri, 27 Feb 2026 14:10:03 -0800 Subject: [WARP] Demote locking surrounding container function fetching By demoting the containers lock to read only for fetching we can prevent blocking the main ui thread while waiting for the network requests to finish --- plugins/warp/src/plugin/ffi/container.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/warp/src/plugin') diff --git a/plugins/warp/src/plugin/ffi/container.rs b/plugins/warp/src/plugin/ffi/container.rs index a107a785..79f45dcb 100644 --- a/plugins/warp/src/plugin/ffi/container.rs +++ b/plugins/warp/src/plugin/ffi/container.rs @@ -220,7 +220,7 @@ pub unsafe extern "C" fn BNWARPContainerFetchFunctions( count: usize, ) { let arc_container = ManuallyDrop::new(Arc::from_raw(container)); - let Ok(mut container) = arc_container.write() else { + let Ok(container) = arc_container.read() else { return; }; @@ -246,7 +246,7 @@ pub unsafe extern "C" fn BNWARPContainerGetSources( count: *mut usize, ) -> *mut BNWARPSource { let arc_container = ManuallyDrop::new(Arc::from_raw(container)); - let Ok(container) = arc_container.write() else { + let Ok(container) = arc_container.read() else { return std::ptr::null_mut(); }; -- cgit v1.3.1