diff --git a/src/win32/mod.rs b/src/win32/mod.rs index c502e3de..c2fd1034 100644 --- a/src/win32/mod.rs +++ b/src/win32/mod.rs @@ -270,7 +270,7 @@ impl<'a> Iterator for PollEventsIterator<'a> { fn next(&mut self) -> Option { use events::Event::Closed; - match self.window.events_receiver.recv() { + match self.window.events_receiver.try_recv() { Ok(Closed) => { use std::sync::atomic::Ordering::Relaxed; self.window.is_closed.store(true, Relaxed);