[issue38501] multiprocessing.Pool hangs atexit (and garbage collection sometimes)

2020-04-10 Thread Eric Larson
Eric Larson added the comment: > Why? This is a resource like any other and it requires proper resource > management. Would you also put a big warning on "open()" stating that opening > a file requires either using a context manager or ensure a manual close()? One pot

[issue38501] multiprocessing.Pool hangs atexit (and garbage collection sometimes)

2020-04-10 Thread Eric Larson
Eric Larson added the comment: If that's out of contract, perhaps there should probably a big, visible warning at the top of the multiprocessning docs stating that creating one of these objects requires either using a context manager or ensuring manual `.close()`ing? 1. It either used

[issue38501] multiprocessing.Pool hangs atexit (and garbage collection sometimes)

2019-10-16 Thread Eric Larson
New submission from Eric Larson : The following code hangs on Python 3.8.0.rc0 on Ubuntu 19.10 when exiting the interpreter: from multiprocessing import Pool class A(object): def __init__(self): self.pool = Pool(processes=2) solver = A() When you eventually do ctrl-C