Merge pull request #1643 from bugadani/clear_timer
Reset `expires_at` of finished task
This commit is contained in:
commit
a615a70eda
@ -165,6 +165,9 @@ impl<F: Future + 'static> TaskStorage<F> {
|
|||||||
Poll::Ready(_) => {
|
Poll::Ready(_) => {
|
||||||
this.future.drop_in_place();
|
this.future.drop_in_place();
|
||||||
this.raw.state.fetch_and(!STATE_SPAWNED, Ordering::AcqRel);
|
this.raw.state.fetch_and(!STATE_SPAWNED, Ordering::AcqRel);
|
||||||
|
|
||||||
|
#[cfg(feature = "integrated-timers")]
|
||||||
|
this.raw.expires_at.set(Instant::MAX);
|
||||||
}
|
}
|
||||||
Poll::Pending => {}
|
Poll::Pending => {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user