!37254 Ignore exceptions during python termination

Merge pull request !37254 from h.farahat/mp_ter
This commit is contained in:
i-robot 2022-07-05 14:22:33 +00:00 committed by Gitee
commit 97c7d50da1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 8 additions and 2 deletions

View File

@ -2928,7 +2928,10 @@ class _PythonMultiprocessing(cde.PythonMultiprocessingRuntime):
self.threads_to_workers = {}
def __del__(self):
self.terminate()
try:
self.terminate()
except TypeError:
pass
# This wait function is for cleaning zombie subprocesses
@staticmethod

View File

@ -341,7 +341,10 @@ class SamplerFn:
thread.join()
def __del__(self):
self._stop_subprocess()
try:
self._stop_subprocess()
except TypeError:
pass
def _subprocess_handle(eof, signum, frame):