abort tasks for non-async pool shudown

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-12-18 03:29:42 +00:00 committed by strawberry
parent 7b8320e0eb
commit 4d46df2af5
2 changed files with 12 additions and 5 deletions

View file

@ -347,7 +347,8 @@ impl Drop for Engine {
fn drop(&mut self) {
const BLOCKING: bool = true;
debug_assert!(!self.pool.close(), "request pool was not closed");
debug!("Closing frontend pool");
self.pool.close();
debug!("Waiting for background tasks to finish...");
self.db.cancel_all_background_work(BLOCKING);