fix(platform/orbital): handle EINTR when reading from event_socket
Signed-off-by: Anhad Singh <andypython@protonmail.com>
This commit is contained in:
parent
6c9a2d4e9b
commit
ed46dd031d
1 changed files with 7 additions and 1 deletions
|
|
@ -639,7 +639,13 @@ impl EventLoop {
|
|||
|
||||
// Wait for event if needed.
|
||||
let mut event = syscall::Event::default();
|
||||
self.window_target.event_socket.read(&mut event).unwrap();
|
||||
loop {
|
||||
match self.window_target.event_socket.read(&mut event) {
|
||||
Ok(_) => break,
|
||||
Err(syscall::Error { errno: syscall::EINTR }) => continue,
|
||||
Err(err) => unreachable!("failed to read event: {}", err),
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: handle spurious wakeups (redraw caused wakeup but redraw already handled)
|
||||
match requested_resume {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue