Skip to content

Commit d59b81e

Browse files
committed
revert spawn commit
1 parent d0c1869 commit d59b81e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fastcore/parallel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def parallel(f, items, *args, n_workers=defaults.cpus, total=None, progress=None
106106
kwpool = {}
107107
if threadpool: pool = ThreadPoolExecutor
108108
else:
109-
if not method and sys.platform == 'darwin' and not IN_NOTEBOOK: method='spawn'
109+
if not method and sys.platform == 'darwin': method='fork'
110110
if method: kwpool['mp_context'] = get_context(method)
111111
pool = ProcessPoolExecutor
112112
with pool(n_workers, pause=pause, **kwpool) as ex:

nbs/03a_parallel.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@
312312
" kwpool = {}\n",
313313
" if threadpool: pool = ThreadPoolExecutor\n",
314314
" else:\n",
315-
" if not method and sys.platform == 'darwin' and not IN_NOTEBOOK: method='spawn'\n",
315+
" if not method and sys.platform == 'darwin': method='fork'\n",
316316
" if method: kwpool['mp_context'] = get_context(method)\n",
317317
" pool = ProcessPoolExecutor\n",
318318
" with pool(n_workers, pause=pause, **kwpool) as ex:\n",

0 commit comments

Comments
 (0)