1
Fork 0

Switched to ThreadPool

This commit is contained in:
Edgar P. Burkhart 2022-03-15 11:46:33 +01:00
parent e62bb932c6
commit 6d553da093
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227

View file

@ -1,7 +1,7 @@
import argparse import argparse
import configparser import configparser
import logging import logging
from multiprocessing.pool import Pool from multiprocessing.pool import ThreadPool
import pathlib import pathlib
import numpy as np import numpy as np
@ -39,7 +39,7 @@ var = {
} }
inp.mkdir(exist_ok=True) inp.mkdir(exist_ok=True)
with Pool() as pool: with ThreadPool() as pool:
log.info("Converting all data") log.info("Converting all data")
pool.map( pool.map(
lambda x: np.save( lambda x: np.save(