Xiang Zhang added the comment:

> Your patch looks to be introducing a number of changes to the structure of 
> the data being passed around between threads and even monitored/indirectly 
> shared across processes. 

That's why I say even myself don't like it. To solve an edge case some long 
introduced codes have to been changed. Sigh.

> Under relevant conditions, check both _items and _unsorted (not only _items) 
> before declaring that we truly have all results in.

I think you mean your patch. But how does it solve the reentrant problem? Yeah, 
actually it's not reentrant. If the problematic job is not the first job with 
id 0, then the exception won't be set.

With your patch, repeatedly execute print(list(pool.imap(str, gen()))). Only 
the first time there is an exception.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28699>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to