mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-10-01 12:20:39 +00:00
drop inner borrow before dropping task
This commit is contained in:
parent
4545110f45
commit
0cfa98566e
@ -364,6 +364,7 @@ impl Core {
|
||||
};
|
||||
drop(inner);
|
||||
let res = CURRENT_LOOP.set(self, || task.poll_future(wake));
|
||||
let _task_to_drop;
|
||||
inner = self.inner.borrow_mut();
|
||||
match res {
|
||||
Ok(Async::NotReady) => {
|
||||
@ -372,9 +373,10 @@ impl Core {
|
||||
}
|
||||
Ok(Async::Ready(())) |
|
||||
Err(()) => {
|
||||
inner.task_dispatch.remove(token).unwrap();
|
||||
_task_to_drop = inner.task_dispatch.remove(token).unwrap();
|
||||
}
|
||||
}
|
||||
drop(inner);
|
||||
}
|
||||
|
||||
fn consume_timeouts(&mut self, now: Instant) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user