Python Forum
How to use pool.map effectively? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: How to use pool.map effectively? (/thread-21591.html)

Pages: 1 2


RE: How to use pool.map effectively? - AlekseyPython - Oct-11-2019

from concurrent.futures import ProcessPoolExecutor
 
with ProcessPoolExecutor() as executor:
    results = executor.map(my_func, args=args_list)
ProcessPoolExecutor does not really terminate processes before starting to process new tasks. Thank!