dioxus-desktop 0.7.2

WebView renderer for Dioxus
Documentation
1
2
3
4
5
6
7
8
9
10
/// This is a hack to get around the fact that wry is currently not thread safe on android
///
/// We want to acquire this mutex before doing anything with the virtualdom directly
pub fn android_runtime_lock() -> std::sync::MutexGuard<'static, ()> {
    use std::sync::{Mutex, OnceLock};

    static RUNTIME_LOCK: OnceLock<Mutex<()>> = OnceLock::new();

    RUNTIME_LOCK.get_or_init(|| Mutex::new(())).lock().unwrap()
}