[issue14406] Race condition in concurrent.futures

2012-08-20 Thread Ralf Schmitt
Changes by Ralf Schmitt python-b...@systemexit.de: -- nosy: +schmir ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14406 ___ ___ Python-bugs-list

[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-03-31 Thread Matt Joiner
Matt Joiner anacro...@gmail.com 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

[issue14406] Race condition in concurrent.futures

2012-03-31 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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

[issue14406] Race condition in concurrent.futures

2012-03-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch looks fine, I've committed it. Thanks! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14406

[issue14406] Race condition in concurrent.futures

2012-03-29 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Could your patch also include a proper test case in Lib/test/test_concurrent_futures.py ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14406

[issue14406] Race condition in concurrent.futures

2012-03-29 Thread Matt Joiner
Matt Joiner anacro...@gmail.com added the comment: I'll add this shortly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14406 ___ ___

[issue14406] Race condition in concurrent.futures

2012-03-25 Thread Matt Joiner
New submission from Matt Joiner anacro...@gmail.com: 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:

[issue14406] Race condition in concurrent.futures

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

[issue14406] Race condition in concurrent.futures

2012-03-25 Thread Matt Joiner
Changes by Matt Joiner anacro...@gmail.com: -- nosy: +bquinlan, loewis, pitrou, rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14406 ___