mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
Merge pull request #269 from tomaka/tomaka-patch-2
Fix poll_events() blocking on win32
This commit is contained in:
@@ -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