From 5815e0501485bcca0f03a5004e8c477d18f41156 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Wed, 8 Jan 2025 14:45:23 -0800 Subject: [PATCH] fix: add additional lock when calling wait_for_work on android (#3524) * fix: add additional lock when calling wait_for_work * simplify --- packages/desktop/src/webview.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/desktop/src/webview.rs b/packages/desktop/src/webview.rs index 301ddb8da..440807d94 100644 --- a/packages/desktop/src/webview.rs +++ b/packages/desktop/src/webview.rs @@ -445,6 +445,8 @@ impl WebviewInstance { } { + // lock the hack-ed in lock sync wry has some thread-safety issues with event handlers and async tasks + let _lock = crate::android_sync_lock::android_runtime_lock(); let fut = self.dom.wait_for_work(); pin_mut!(fut);