diff options
author | tomaka <pierre.krieger1708@gmail.com> | 2015-02-11 15:39:14 +0100 |
---|---|---|
committer | tomaka <pierre.krieger1708@gmail.com> | 2015-02-11 15:39:14 +0100 |
commit | de56a569e8e920cfec62df78b6d2ab852740e22a (patch) | |
tree | adc4cb38c8d5bc43dbe110de2020c78d1780367c | |
parent | 4500702a0294065f876ca10e7629fd32e213ca76 (diff) | |
parent | d1bf1e8ac0a70eaf96acfdd7abe1ddbd08a25827 (diff) | |
download | glutin-de56a569e8e920cfec62df78b6d2ab852740e22a.tar.gz glutin-de56a569e8e920cfec62df78b6d2ab852740e22a.zip |
Merge pull request #269 from tomaka/tomaka-patch-2
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); |