]> granicus.if.org Git - python/commitdiff
Issue #18620: Improve Pool examples in multiprocessing documentation
authorBerker Peksag <berker.peksag@gmail.com>
Thu, 21 Jan 2016 22:00:06 +0000 (00:00 +0200)
committerBerker Peksag <berker.peksag@gmail.com>
Thu, 21 Jan 2016 22:00:06 +0000 (00:00 +0200)
A single call to Pool.apply_async() will create only one process. To use all
of the pool's processes, it should be invoked multiple times:

    with Pool(processes=4) as pool:
        results = [pool.apply_async(func, ()) for i in range(4)]

Patch by Davin Potts.

1  2 
Doc/library/multiprocessing.rst

Simple merge