From 869c4530b2e8d3ded07ba89eecca57f5dab6455d Mon Sep 17 00:00:00 2001 From: Vaughn Kottler Date: Sun, 13 Aug 2023 00:12:22 -0500 Subject: [PATCH] Try using ThreadPool instead --- .coveragerc | 2 +- ifgen/generation/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.coveragerc b/.coveragerc index 8d08c84..6c3a9b8 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,3 @@ [run] -concurrency = multiprocessing +concurrency = thread omit = tests/* diff --git a/ifgen/generation/__init__.py b/ifgen/generation/__init__.py index b5bc467..e21e216 100644 --- a/ifgen/generation/__init__.py +++ b/ifgen/generation/__init__.py @@ -3,7 +3,7 @@ """ # built-in -from multiprocessing import Pool +from multiprocessing.pool import ThreadPool from pathlib import Path # internal @@ -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,