Allow clearing finished task from timer queue

This commit is contained in:
Dániel Buga 2023-07-12 16:52:52 +02:00
parent d8c7c3fc4b
commit a2501bd5c1

View File

@ -165,6 +165,9 @@ impl<F: Future + 'static> TaskStorage<F> {
Poll::Ready(_) => {
this.future.drop_in_place();
this.raw.state.fetch_and(!STATE_SPAWNED, Ordering::AcqRel);
#[cfg(feature = "integrated-timers")]
this.raw.expires_at.set(Instant::MAX);
}
Poll::Pending => {}
}