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 bquinlan
Recipients bquinlan, glangford, mark.dickinson, sbt, tim.peters, vstinner
Date 2014-01-26.03:18:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390706334.66.0.653487429173.issue20319@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-01-26 03:18:54bquinlansetrecipients: + bquinlan, tim.peters, mark.dickinson, vstinner, sbt, glangford
2014-01-26 03:18:54bquinlansetmessageid: <1390706334.66.0.653487429173.issue20319@psf.upfronthosting.co.za>
2014-01-26 03:18:54bquinlanlinkissue20319 messages
2014-01-26 03:18:54bquinlancreate