From 65ff3744a06ca5bcb2e1682862d49520bf7ccbfe Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 14 Dec 2019 01:33:31 +0100 Subject: Remove unnecessary event loop proxy `Mutex` I am not sure why I had to use it in the first place... --- winit/src/application.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'winit/src/application.rs') diff --git a/winit/src/application.rs b/winit/src/application.rs index 67a035f7..25396b6f 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -469,17 +469,12 @@ impl Subscriptions { futures::channel::mpsc::channel(100); let stream = recipe.stream(event_receiver); - - // TODO: Find out how to avoid using a mutex here - let proxy = - std::sync::Arc::new(std::sync::Mutex::new(proxy.clone())); + let proxy = proxy.clone(); let future = futures::future::select( cancelled, stream.for_each(move |message| { proxy - .lock() - .expect("Acquire event loop proxy lock") .send_event(message) .expect("Send subscription result to event loop"); -- cgit