Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve multiprocessing deadlock warning by switching to 'spawn' star…
…t method This commit addresses a DeprecationWarning related to using `fork()` in multi-threaded processes, which can lead to deadlocks in the child processes when using Python's `multiprocessing` module. - Modified the `batch_run` function to set the multiprocessing start method to 'spawn' by default. - The 'spawn' method avoids the issues that arise from forking in a multi-threaded environment by starting a new Python interpreter process for each worker, which is safer and more compatible with modern systems. - This change ensures that the warning related to multi-threading and `fork()` is resolved across all environments where multiprocessing is used. The change is applied globally to ensure consistent behavior in both code execution and testing environments. The test suite should now run without issuing a DeprecationWarning, and the multiprocessing behavior will be more robust, especially in environments that rely on threads.
- Loading branch information