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 <>
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

    next((pool.imap(str, gen())))
    # Will be catched using 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')
Date User Action Args
2016-11-15 12:52:50lev-veshnyakovsetrecipients: + lev-veshnyakov
2016-11-15 12:52:50lev-veshnyakovsetmessageid: <>
2016-11-15 12:52:50lev-veshnyakovlinkissue28696 messages
2016-11-15 12:52:50lev-veshnyakovcreate