From 1c2ca981d8e86c8ba79514ab0849d6ceb6ee1fb4 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Apr 2022 08:59:20 +0530 Subject: [PATCH] Cleanup overseers explicitly on exit so that their __del__ method doesnt delay shutdown --- src/calibre/gui2/ui.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index d11e8bf700..a0b90fe8cb 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -1183,10 +1183,13 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ self.hide_windows() if self._spare_pool is not None: self._spare_pool.shutdown() + from calibre.scraper.simple import cleanup_overseers + wait_for_cleanup = cleanup_overseers() from calibre.db.delete_service import shutdown shutdown() time.sleep(2) self.istores.join() + wait_for_cleanup() return True def run_wizard(self, *args):