Skip to content

Commit 4566f1b

Browse files
authored
Add one more get_context() (google#89)
1 parent c834db2 commit 4566f1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler_opt/distributed/local/local_worker_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ class LocalWorkerPool(AbstractContextManager):
226226
def __init__(self, worker_class: 'type[Worker]', count: Optional[int], *args,
227227
**kwargs):
228228
if not count:
229-
count = multiprocessing.cpu_count()
229+
count = multiprocessing.get_context().cpu_count()
230230
self._stubs = [
231231
_make_stub(worker_class, *args, **kwargs) for _ in range(count)
232232
]

0 commit comments

Comments
 (0)