diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-02-11 15:34:08 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-02-11 15:34:08 +0100 |
commit | d1bf1e8ac0a70eaf96acfdd7abe1ddbd08a25827 (patch) | |
tree | adc4cb38c8d5bc43dbe110de2020c78d1780367c | |
parent | 4500702a0294065f876ca10e7629fd32e213ca76 (diff) | |
download | glutin-d1bf1e8ac0a70eaf96acfdd7abe1ddbd08a25827.tar.gz glutin-d1bf1e8ac0a70eaf96acfdd7abe1ddbd08a25827.zip |
Fix poll_events() blocking on win32
-rw-r--r-- | src/win32/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<Event> { 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); |