Explorar el Código

Shutdown processpool executor when stopping Job dispatcher in standalone mode.

jrobinAV hace 1 año
padre
commit
fa643896df

+ 4 - 0
taipy/core/_orchestrator/_dispatcher/_standalone_job_dispatcher.py

@@ -52,3 +52,7 @@ class _StandaloneJobDispatcher(_JobDispatcher):
     def _update_job_status_from_future(self, job: Job, ft):
         self._pop_dispatched_process(job.id)  # type: ignore
         self._update_job_status(job, ft.result())
+
+    def stop(self):
+        self._executor.shutdown(wait=True, cancel_futures=True)
+        super().stop()