1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Use atomic_refcell instead of parking_lot for wasm32 targets (#1404)

Closes https://github.com/emilk/egui/issues/1401
This commit is contained in:
Emil Ernerfeldt
2022-03-22 15:34:21 +01:00
committed by GitHub
parent e5aeb1618f
commit 41b178b6ec
9 changed files with 99 additions and 10 deletions

View File

@@ -63,7 +63,6 @@ epi = { version = "0.17.0", path = "../epi", optional = true }
bytemuck = "1.7"
glow = "0.11"
memoffset = "0.6"
parking_lot = "0.12"
tracing = "0.1"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]

View File

@@ -54,7 +54,7 @@ pub fn run(app_name: &str, native_options: &epi::NativeOptions, app_creator: epi
);
{
let event_loop_proxy = parking_lot::Mutex::new(event_loop.create_proxy());
let event_loop_proxy = egui::mutex::Mutex::new(event_loop.create_proxy());
integration.egui_ctx.set_request_repaint_callback(move || {
event_loop_proxy.lock().send_event(RequestRepaintEvent).ok();
});