mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Ensure cleanup waits on workers
This commit is contained in:
parent
32c3ea445c
commit
6ccbfb6929
@ -176,10 +176,12 @@ def clean_running_workers():
|
||||
global preloaded_worker
|
||||
if preloaded_worker is not None:
|
||||
preloaded_worker.kill()
|
||||
preloaded_worker.wait()
|
||||
preloaded_worker = None
|
||||
for p in running_workers:
|
||||
if p.poll() is None:
|
||||
p.kill()
|
||||
p.wait()
|
||||
del running_workers[:]
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user