Skip to content

Commit 389f144

Browse files
committed
potential multiprocessing fix for macos
1 parent e2496e8 commit 389f144

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

livermask/utils/process.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def intensity_normalization(volume, intensity_clipping_range):
3939

4040
def liver_segmenter_wrapper(curr, output, cpu, verbose, multiple_flag, name):
4141
# run inference in a different process
42+
mp.set_start_method('spawn')
4243
with mp.Pool(processes=1, maxtasksperchild=1) as p: # , initializer=initializer)
4344
result = p.map_async(liver_segmenter, ((curr, output, cpu, verbose, multiple_flag, name), ))
4445
log.info("getting result from process...")

0 commit comments

Comments
 (0)