[issue14406] Race condition in concurrent.futures

2012-08-20 Thread Ralf Schmitt
Ralf Schmitt added the comment: I think having a lock here is unnecessary. The following code should work: def _decrement_pending_calls(self): if self.num_pending_calls == len(self.finished_futures): self.event.set() (well, maybe the method should also be renamed then) --

[issue14406] Race condition in concurrent.futures

2012-08-20 Thread Ralf Schmitt
Changes by Ralf Schmitt : -- nosy: +schmir ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14406] Race condition in concurrent.futures

2012-03-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks fine, I've committed it. Thanks! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker _

[issue14406] Race condition in concurrent.futures

2012-03-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0312db5265d0 by Antoine Pitrou in branch '3.2': Issue #14406: Fix a race condition when using `concurrent.futures.wait(return_when=ALL_COMPLETED)`. http://hg.python.org/cpython/rev/0312db5265d0 New changeset 2c1432552213 by Antoine Pitrou in branc

[issue14406] Race condition in concurrent.futures

2012-03-31 Thread Matt Joiner
Matt Joiner added the comment: Patch with a test included. Being a nondeterministic bug, please adjust the thread count, or timing as necessary, the parameters in the patch are as low as I can get them and still reasonably reproduce the bug (linux 3.2, i386). There's a few complications in te

[issue14406] Race condition in concurrent.futures

2012-03-29 Thread Matt Joiner
Matt Joiner added the comment: I'll add this shortly. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue14406] Race condition in concurrent.futures

2012-03-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Could your patch also include a proper test case in Lib/test/test_concurrent_futures.py ? -- ___ Python tracker ___ __

[issue14406] Race condition in concurrent.futures

2012-03-25 Thread Matt Joiner
Changes by Matt Joiner : -- nosy: +bquinlan, loewis, pitrou, rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue14406] Race condition in concurrent.futures

2012-03-25 Thread Matt Joiner
Matt Joiner added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file25020/concurrent.futures._AllCompletedWaiter-race-condition.patch ___ Python tracker _

[issue14406] Race condition in concurrent.futures

2012-03-25 Thread Matt Joiner
New submission from Matt Joiner : There's a race condition in concurrent.futures in _AllCompletedWaiter, which affects wait(return_when=ALL_COMPLETED). The attached test will go into an infinite wait. -- components: Library (Lib) files: concurrent.futures._AllCompletedWaiter-race-condi