Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check before setting multiprocessing context to prevent the Runti…
…meError (#4620) * Add check before setting multiprocessing context to prevent the runtime error: context has already been set When `pycbc` is used with some multiprocessing package such as `dask`, importing `pycbc` will cause setting the multiprocessing context repeatedly. The `RuntimeError: context has already been set` will happen. This fix will check the context before setting it. * Update __init__.py Change raising error to warning * wrap the lines --------- Co-authored-by: Yumeng Xu <yumeng.xu@physik.uzh.ch>
- Loading branch information