Brian Quinlan added the comment:
I'm looking at "futures.patch".
I don't understand why these blocks are helpful -"_create_and_install_waiters"
has two call sites and both ("as_completed" and "wait") call
"_create_and_install_waiters" from within an _AcquireFutures context manager:
- pending_count = sum(
- f._state not in [CANCELLED_AND_NOTIFIED, FINISHED] for f in fs)
+ with _AcquireFutures(fs):
+ pending_count = sum(
+ f._state not in [CANCELLED_AND_NOTIFIED, FINISHED]
+ for f in fs)
- for f in fs:
- f._waiters.append(waiter)
+ with _AcquireFutures(fs):
+ for f in fs:
+ f._waiters.append(waiter)
It seems more plausible that the locks around the removals are fixing the bug
but I don't see how. I'll look into it some more.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue20319>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com