Skip to content

Commit

Permalink
Fix check on Python 2 systems
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Jun 4, 2024
1 parent 839ffc9 commit 06415df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/multifit/pyext/src/fit_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
def _get_context():
# Use 'forkserver' rather than 'fork' start method if we can; 'fork' does
# not work well with multithreaded processes or CUDA
if 'forkserver' in multiprocessing.get_all_start_methods():
if (hasattr(multiprocessing, 'get_all_start_methods')
and 'forkserver' in multiprocessing.get_all_start_methods()):
return multiprocessing.get_context('forkserver')
else:
return multiprocessing.get_context()
Expand Down

0 comments on commit 06415df

Please sign in to comment.