Fix support for sub-process (process pool)

This commit is contained in:
allegroai 2019-07-20 23:55:14 +03:00
parent c80aae0e1e
commit c93d030109

View File

@ -28,7 +28,9 @@ class AsyncManagerMixin(object):
continue continue
# add result # add result
if result and not result.ready(): if result and not result.ready():
cls._async_results[pid] = cls._async_results.get(pid, []).append(result) if not cls._async_results.get(pid):
cls._async_results[pid] = []
cls._async_results[pid].append(result)
break break
finally: finally:
cls._async_results_lock.release() cls._async_results_lock.release()