ThreadPool should be terminated, not closed, otherwise it might hang

This commit is contained in:
allegroai 2020-04-09 11:39:03 +03:00
parent 070fd8149a
commit e1fc9b3dc8

View File

@ -222,14 +222,14 @@ class Metrics(InterfaceBase):
if file_pool: if file_pool:
try: try:
file_pool.close() file_pool.terminate()
file_pool.join() file_pool.join()
except: except:
pass pass
if pool: if pool:
try: try:
pool.close() pool.terminate()
pool.join() pool.join()
except: except:
pass pass