diff options
| author | Dániel Buga <[email protected]> | 2023-07-12 16:52:52 +0200 |
|---|---|---|
| committer | Dániel Buga <[email protected]> | 2023-07-12 16:56:02 +0200 |
| commit | a2501bd5c1004362368d962b206b6de8f4962837 (patch) | |
| tree | 784773f5199388da44b252037a481eb7af54f146 /embassy-executor | |
| parent | d8c7c3fc4be377491f5073dff3f884d7af106c57 (diff) | |
Allow clearing finished task from timer queue
Diffstat (limited to 'embassy-executor')
| -rw-r--r-- | embassy-executor/src/raw/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs index bd0cff26b..f3760f589 100644 --- a/embassy-executor/src/raw/mod.rs +++ b/embassy-executor/src/raw/mod.rs | |||
| @@ -165,6 +165,9 @@ impl<F: Future + 'static> TaskStorage<F> { | |||
| 165 | Poll::Ready(_) => { | 165 | Poll::Ready(_) => { |
| 166 | this.future.drop_in_place(); | 166 | this.future.drop_in_place(); |
| 167 | this.raw.state.fetch_and(!STATE_SPAWNED, Ordering::AcqRel); | 167 | this.raw.state.fetch_and(!STATE_SPAWNED, Ordering::AcqRel); |
| 168 | |||
| 169 | #[cfg(feature = "integrated-timers")] | ||
| 170 | this.raw.expires_at.set(Instant::MAX); | ||
| 168 | } | 171 | } |
| 169 | Poll::Pending => {} | 172 | Poll::Pending => {} |
| 170 | } | 173 | } |
