mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
Do not run timer queue if no alarm is set.
This commit is contained in:
parent
267ec334ac
commit
b01a88a839
@ -214,9 +214,11 @@ impl Executor {
|
||||
/// Runs the executor until the queue is empty.
|
||||
pub fn run(&self) {
|
||||
unsafe {
|
||||
self.timer_queue.dequeue_expired(Instant::now(), |p| {
|
||||
self.enqueue(p);
|
||||
});
|
||||
if self.alarm.is_some() {
|
||||
self.timer_queue.dequeue_expired(Instant::now(), |p| {
|
||||
self.enqueue(p);
|
||||
});
|
||||
}
|
||||
|
||||
self.run_queue.dequeue_all(|p| {
|
||||
let header = &*p;
|
||||
|
Loading…
Reference in New Issue
Block a user