Fix race in enqueuing expired tasks.
This commit is contained in:
parent
bb6f25d010
commit
a02d0a378e
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue