Skip to content

Commit

Permalink
trying forkserver
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Meyer committed Feb 20, 2018
1 parent 69ea865 commit 5df260b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trufflepig/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def apply_parallel(function, iterable, ncores, chunksize=1000):
if ncores == 1:
return [function(x) for x in iterable]
else:
ctx = mp.get_context('spawn')
ctx = mp.get_context('forkserver')
pool = ctx.Pool(ncores)

results = [x for x in pool.imap(function, iterable, chunksize)]
Expand Down

0 comments on commit 5df260b

Please sign in to comment.