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 lev-veshnyakov
Recipients lev-veshnyakov
Date 2016-11-15.12:52:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479214370.8.0.751710549169.issue28696@psf.upfronthosting.co.za>
In-reply-to
Content
It's only in imap, in map it's ok. The following code explains the issue:


from multiprocessing.pool import ThreadPool

pool = ThreadPool(10)

def gen():
    yield 1 + '1' # here is an error

try:
    next((pool.imap(str, gen())))
except:
    # Will be catched using pool.map normally, but using pool.imap will be not.
    # Instead it hangs. This is the same for ThreadPool and Pool.
    print('this will not be printed because thread is hanging')
History
Date User Action Args
2016-11-15 12:52:50lev-veshnyakovsetrecipients: + lev-veshnyakov
2016-11-15 12:52:50lev-veshnyakovsetmessageid: <1479214370.8.0.751710549169.issue28696@psf.upfronthosting.co.za>
2016-11-15 12:52:50lev-veshnyakovlinkissue28696 messages
2016-11-15 12:52:50lev-veshnyakovcreate