Cleanup overseers explicitly on exit so that their __del__ method doesnt delay shutdown

This commit is contained in:
Kovid Goyal 2022-04-02 08:59:20 +05:30
parent b7c92f3498
commit 1c2ca981d8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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):