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 davin
Recipients davin, elias, lev-veshnyakov, xiang.zhang
Date 2016-11-25.22:03:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
@xiang.zhang:  Nice catch -- thank you for pointing out the additional issue that arises when trying to provoke the issue twice in a row.

The module attribute `job_counter` helped, in this situation, point out what might have otherwise been overlooked.

I didn't like any of my previously suggested approaches, but I think there's a 4th option:
4.  Guard against misbehaving generators/iterables *before* they are put into the taskqueue.

Now when we provide a problematic generator/iterable to imap, the exception it triggers is caught and the resulting exception passed through the system to make use of the logic that is already in place.

This same issue can arise for imap_unordered() as well as imap() and can be addressed in the same manner.

Attaching another preliminary patch that still lacks formal tests but I'll attach crude versions of tests momentarily.

If we're still missing some use case or other logic path, now's the time to find it.
Date User Action Args
2016-11-25 22:03:33davinsetrecipients: + davin, elias, xiang.zhang, lev-veshnyakov
2016-11-25 22:03:33davinsetmessageid: <>
2016-11-25 22:03:33davinlinkissue28699 messages
2016-11-25 22:03:33davincreate