Infinite wait when running Python ProcessPoolExecutor.map()
-method
When n
is 10000 to 20000, it works normally, but there is no response until it is forcefully terminated at 100,000.
Other machines with 4 core and 32 GB RAM work, but only this machine does not work.
These are the machine specs :
Any reason?
from concurrent.futures import ProcessPoolExecutor
from tqdm import tqdm
def test_func(x):
return x+1
if __name__ == '__main__':
n = 100000
with ProcessPoolExecutor(4) as p:
lst = list( tqdm( p.map( test_func,
[i for i in range(n)]
),
total = n,
leave = True
)
)
# tried the same without a tqdm()-decorated GUI-progress monitor
#lst = list( p.map( test_func,
# [i for i in range(n)]
# )
# )
I tried removing tqdm()
, increasing ulimit
and changing Python version from 3.9 to 3.10, but all did not work.