Skip to content

Commit

Permalink
Do not reset expiration on tasks that are not running
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Nov 26, 2024
1 parent 37111a8 commit b55d919
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions embassy-executor/src/raw/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,6 @@ impl SyncExecutor {
self.run_queue.dequeue_all(|p| {
let task = p.header();

#[cfg(feature = "integrated-timers")]
task.expires_at.set(u64::MAX);

if !task.state.run_dequeue() {
// If task is not running, ignore it. This can happen in the following scenario:
// - Task gets dequeued, poll starts
Expand All @@ -400,6 +397,9 @@ impl SyncExecutor {
return;
}

#[cfg(feature = "integrated-timers")]
task.expires_at.set(u64::MAX);

#[cfg(feature = "rtos-trace")]
trace::task_exec_begin(p.as_ptr() as u32);

Expand Down

0 comments on commit b55d919

Please sign in to comment.