This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fiete
Recipients davin, elias, fiete, lev-veshnyakov, xiang.zhang
Date 2016-12-01.13:00:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1480597210.36.0.545700315512.issue28699@psf.upfronthosting.co.za>
In-reply-to
Content
Since the only thing I know about the multiprocessing internals is what I just read in the source code trying to debug my imap_unordered call, I'll add the following example, not knowing whether this is already covered by everything you have until now.


import multiprocessing.pool

def gen():
    raise Exception('generator exception')
    yield 1
    yield 2

for i in range(3):
    with multiprocessing.pool.ThreadPool(3) as pool:
        try:
            print(list(pool.imap_unordered(lambda x: x*2, gen())))
        except Exception as e:
            print(e)


This only prints 'generator exception' once for the first iteration. For the following iterations imap_unordered returns an empty list. This is the case for both Pool and ThreadPool.
History
Date User Action Args
2016-12-01 13:00:10fietesetrecipients: + fiete, elias, davin, xiang.zhang, lev-veshnyakov
2016-12-01 13:00:10fietesetmessageid: <1480597210.36.0.545700315512.issue28699@psf.upfronthosting.co.za>
2016-12-01 13:00:10fietelinkissue28699 messages
2016-12-01 13:00:10fietecreate