mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-20 14:55:30 +01:00
Fix error based on retry queue
This commit is contained in:
parent
07bd57a20f
commit
4a349653b4
3 changed files with 12 additions and 10 deletions
|
|
@ -162,7 +162,9 @@ where
|
|||
let now = mono.now();
|
||||
if instant <= now {
|
||||
// Task became ready, wake the waker
|
||||
self.waker_queue.pop().map(|v| v.val.waker.wake_by_ref());
|
||||
if let Some(v) = self.waker_queue.pop() {
|
||||
v.val.waker.wake_by_ref()
|
||||
}
|
||||
} else {
|
||||
// Set compare
|
||||
mono.set_compare(instant);
|
||||
|
|
@ -172,7 +174,9 @@ where
|
|||
// read of now to the set of the compare, the time can overflow. This is to
|
||||
// guard against this.
|
||||
if instant <= now {
|
||||
self.waker_queue.pop().map(|v| v.val.waker.wake_by_ref());
|
||||
if let Some(v) = self.waker_queue.pop() {
|
||||
v.val.waker.wake_by_ref()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue