From d1bf1e8ac0a70eaf96acfdd7abe1ddbd08a25827 Mon Sep 17 00:00:00 2001 From: tomaka Date: Wed, 11 Feb 2015 15:34:08 +0100 Subject: Fix poll_events() blocking on win32 --- src/win32/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win32/mod.rs b/src/win32/mod.rs index c502e3d..c2fd103 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); -- cgit v1.2.3