mirror of
https://github.com/storytold/winit.git
synced 2026-11-24 13:20:44 +01:00
Merge pull request #269 from tomaka/tomaka-patch-2
Fix poll_events() blocking on win32
This commit is contained in:
commit
de56a569e8
1 file changed
+1
-1
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user