refactor: remove once_cell dependency and use std::sync equivalents (#4185)

This commit is contained in:
Falk Woldmann authored and GitHub committed 2025-05-25 16:09:56 +01:00
1 parent 1d954c2f6f
commit 3c3256ec02
22 files changed
+22 -47

No files matched your search

+2 -3
View File
@@ -2,10 +2,9 @@
///
/// We want to acquire this mutex before doing anything with the virtualdom directly
pub fn android_runtime_lock() -> std::sync::MutexGuard<'static, ()> {
use once_cell::sync::OnceCell;
use std::sync::Mutex;
use std::sync::{Mutex, OnceLock};
static RUNTIME_LOCK: OnceCell<Mutex<()>> = OnceCell::new();
static RUNTIME_LOCK: OnceLock<Mutex<()>> = OnceLock::new();
RUNTIME_LOCK.get_or_init(|| Mutex::new(())).lock().unwrap()
}