Fix spawn_count heuristic

This commit is contained in:
Aode (Lion) 2022-01-29 20:48:12 -06:00
parent e145fdc7b8
commit 39240b4a50

View file

@ -261,6 +261,7 @@ impl Inner {
fn prune(&mut self) {
self.head_available = None;
self.prune_time = Instant::now();
self.spawn_count = 0;
}
fn wake(&mut self, task: Arc<Task>) {
@ -400,6 +401,7 @@ impl Executor {
thread: std::thread::current(),
})
.into();
let mut block_on_context = Context::from_waker(&block_on_waker);
loop {