iOS: Always set timer when polling to avoid slow waking (#2979)
* Always set timer when polling to avoid slow waking * add comment and changelog --------- Co-authored-by: Dusty DeWeese <dustin.deweese@gmail.com> Co-authored-by: Mads Marquart <mads@marquart.dk>
This commit is contained in:
parent
ae9b02e097
commit
755c533b08
2 changed files with 2 additions and 3 deletions
|
|
@ -393,9 +393,6 @@ impl AppState {
|
|||
|
||||
let new = self.control_flow;
|
||||
match (old, new) {
|
||||
(ControlFlow::Poll, ControlFlow::Poll) => self.set_state(AppStateImpl::PollFinished {
|
||||
waiting_event_handler,
|
||||
}),
|
||||
(ControlFlow::Wait, ControlFlow::Wait) => {
|
||||
let start = Instant::now();
|
||||
self.set_state(AppStateImpl::Waiting {
|
||||
|
|
@ -428,6 +425,7 @@ impl AppState {
|
|||
});
|
||||
self.waker.start_at(new_instant)
|
||||
}
|
||||
// Unlike on macOS, handle Poll to Poll transition here to call the waker
|
||||
(_, ControlFlow::Poll) => {
|
||||
self.set_state(AppStateImpl::PollFinished {
|
||||
waiting_event_handler,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue