Skip to content

Commit

Permalink
chore(pool): fix endless loop during shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
snormore committed Nov 15, 2024
1 parent cf8e0d0 commit cc94b0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/pool/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,10 @@ where
task.abort();
}
self.ongoing_async_tasks.clear();
while !matches!(self.event_queue.try_recv(), Err(TryRecvError::Empty)) {}
while !matches!(
self.event_queue.try_recv(),
Err(TryRecvError::Empty | TryRecvError::Disconnected)
) {}
},
"POOL: spawn"
);
Expand Down

0 comments on commit cc94b0a

Please sign in to comment.