aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomaka <pierre.krieger1708@gmail.com>2015-02-11 15:39:14 +0100
committertomaka <pierre.krieger1708@gmail.com>2015-02-11 15:39:14 +0100
commitde56a569e8e920cfec62df78b6d2ab852740e22a (patch)
treeadc4cb38c8d5bc43dbe110de2020c78d1780367c
parent4500702a0294065f876ca10e7629fd32e213ca76 (diff)
parentd1bf1e8ac0a70eaf96acfdd7abe1ddbd08a25827 (diff)
downloadglutin-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.rs2
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);