Skip to content

Commit

Permalink
Try using ThreadPool instead
Browse files Browse the repository at this point in the history
  • Loading branch information
vkottler committed Aug 13, 2023
1 parent a8ffaaf commit 869c453
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[run]
concurrency = multiprocessing
concurrency = thread
omit = tests/*
4 changes: 2 additions & 2 deletions ifgen/generation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

# built-in
from multiprocessing import Pool
from multiprocessing.pool import ThreadPool
from pathlib import Path

# internal
Expand All @@ -25,7 +25,7 @@ def generate(root: Path, output: Path, config: Config) -> None:
for subdir in GENERATORS:
output.joinpath(subdir).mkdir(parents=True, exist_ok=True)

pool = Pool() # pylint: disable=consider-using-with
pool = ThreadPool() # pylint: disable=consider-using-with
for gen_name, generator in GENERATORS.items():
pool.map(
generator,
Expand Down

0 comments on commit 869c453

Please sign in to comment.