Skip to content

Commit

Permalink
Set start method to spawn
Browse files Browse the repository at this point in the history
  • Loading branch information
tothtamas28 committed Aug 21, 2024
1 parent c44719e commit 4f49117
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyk/src/pyk/kdist/_kdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import concurrent.futures
import json
import logging
import multiprocessing
import os
import shutil
from concurrent.futures import ProcessPoolExecutor
Expand Down Expand Up @@ -99,7 +100,7 @@ def build(
deps_fqns = [target_id.full_name for target_id in dep_ids]
_LOGGER.info(f"Building targets: {', '.join(deps_fqns)}")

with ProcessPoolExecutor(max_workers=jobs) as pool:
with ProcessPoolExecutor(max_workers=jobs, mp_context=multiprocessing.get_context('spawn')) as pool:
pending: dict[Future[Path], TargetId] = {}

def submit(target_id: TargetId) -> None:
Expand Down

0 comments on commit 4f49117

Please sign in to comment.