Staging: this is not the live site, pydocs.org.
Class which supports an async version of applying functions to arguments. Changed in 3.2, 3.3, 3.4, 3.13 3.2: Added the maxtasksperchild parameter.3.3: Pool objects now support the context management protocol – see Context Manager Types. __enter__() returns the pool object, and __exit__() calls terminate().3.4: Added the context parameter.3.13: processes uses os.process_cpu_count() by default, instead of os.cpu_count().Members of Pool a apply Equivalent of `func(*args, **kwds)`. c close Prevents any more tasks from being submitted to the pool. i imap Equivalent of `map()` -- can be MUCH slower than `Pool.map()`. imap_unordered Like `imap()` method but ordering of results is arbitrary. j join Wait for the worker processes to exit. m map Apply `func` to each element in `iterable`, collecting the results in a list that is returned. map_async Asynchronous version of `map()` method. s starmap Like `map()` method but the elements of the `iterable` are expected to be iterables as well and will be unpacked as arguments. t terminate Stops the worker processes immediately without completing outstanding work.
Python docs © Python Software Foundation · Examples CC0 ·
Source on GitHub · Not affiliated with the PSF