浏览代码

fix: add additional lock when calling wait_for_work on android (#3524)

* fix: add additional lock when calling wait_for_work

* simplify
Jonathan Kelley 5 月之前
父节点
当前提交
5815e05014
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      packages/desktop/src/webview.rs

+ 2 - 0
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);