Skip to content

Commit

Permalink
Attempt test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vkottler committed Aug 13, 2023
1 parent 09b2e81 commit a8ffaaf
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions ifgen/generation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,19 @@ def generate(root: Path, output: Path, config: Config) -> None:
output.joinpath(subdir).mkdir(parents=True, exist_ok=True)

pool = Pool() # pylint: disable=consider-using-with
try:
for gen_name, generator in GENERATORS.items():
pool.map(
generator,
(
GenerateTask(
name,
root,
output.joinpath(gen_name, f"{name}.h"),
data,
config.data,
)
for name, data in config.data.get(gen_name, {}).items()
),
)
finally:
pool.close()
pool.join()
for gen_name, generator in GENERATORS.items():
pool.map(
generator,
(
GenerateTask(
name,
root,
output.joinpath(gen_name, f"{name}.h"),
data,
config.data,
)
for name, data in config.data.get(gen_name, {}).items()
),
)
pool.close()
pool.join()

0 comments on commit a8ffaaf

Please sign in to comment.