Fix race in enqueuing expired tasks.
This commit is contained in:
parent
bb6f25d010
commit
a02d0a378e
@ -216,7 +216,8 @@ impl Executor {
|
|||||||
unsafe {
|
unsafe {
|
||||||
if self.alarm.is_some() {
|
if self.alarm.is_some() {
|
||||||
self.timer_queue.dequeue_expired(Instant::now(), |p| {
|
self.timer_queue.dequeue_expired(Instant::now(), |p| {
|
||||||
self.enqueue(p);
|
let header = &*p;
|
||||||
|
header.enqueue();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user