Skip to content

Commit

Permalink
Set multiprocessing start method not on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasstolker committed Sep 30, 2021
1 parent 46e09e9 commit 55e5c2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pynpoint/util/multiproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

import multiprocessing
from sys import platform

from typing import Callable, Optional, Union
from abc import ABCMeta, abstractmethod
Expand All @@ -17,7 +18,8 @@
# On macOS, the spawn start method is the default since Python 3.8. The fork start method should
# be considered unsafe as it can lead to crashes of the subprocess.
# TODO Not using the fork method results in an error.
multiprocessing.set_start_method('fork')
if platform != 'win32':
multiprocessing.set_start_method('fork')


class TaskInput:
Expand Down

0 comments on commit 55e5c2f

Please sign in to comment.