[docs] [issue34172] multiprocessing.Pool and ThreadPool leak resources after being deleted

STINNER Victor report at bugs.python.org
Mon Dec 3 11:28:50 EST 2018


STINNER Victor <vstinner at redhat.com> added the comment:

"""
def the_test():
    print("Begin")
    for x in multiprocessing.Pool().imap(int,
            ["4", "3"]):
        print(x)
    print("End")
"""

Side-note: Is it correct to use a pool without calling terminate() nor close()? Should we start to emit a ResourceWarning if a pool is not closed explicitly, as we did for files, sockets, asyncio event loops and subprocess.Popen objects?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34172>
_______________________________________


More information about the docs mailing list