summaryrefslogtreecommitdiff
path: root/plugins/warp/src/plugin
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2026-02-27 14:10:03 -0800
committerMason Reed <35282038+emesare@users.noreply.github.com>2026-03-24 18:46:48 -0700
commit7877f7caa3535a7c477c911ddeafdf5bb14ebc14 (patch)
tree06bdfd35c4af82176ff279adbf8d6fac3824c8ba /plugins/warp/src/plugin
parent1e85844d6407db817db25fd43f1dd9756ef0c3ae (diff)
[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
Diffstat (limited to 'plugins/warp/src/plugin')
-rw-r--r--plugins/warp/src/plugin/ffi/container.rs4
1 files changed, 2 insertions, 2 deletions
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();
};