]> granicus.if.org Git - python/commit
Issue #18620: Improve Pool examples in multiprocessing documentation
authorBerker Peksag <berker.peksag@gmail.com>
Thu, 21 Jan 2016 22:07:00 +0000 (00:07 +0200)
committerBerker Peksag <berker.peksag@gmail.com>
Thu, 21 Jan 2016 22:07:00 +0000 (00:07 +0200)
commitf9aa599c0a28c34d3de1c011590a4c555055cdc8
treeb1c332f758961e6bfa3b737fb0adf4d7e740735a
parent047ddfb64d240c54ebc1993f1feb4ec31ff8b042
Issue #18620: Improve Pool examples in multiprocessing documentation

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.
Doc/library/multiprocessing.rst