diff options
author | Alex Gr?nholm <alex.gronholm@nextday.fi> | 2012-08-25 06:50:48 +0000 |
---|---|---|
committer | Alex Gr?nholm <alex.gronholm@nextday.fi> | 2012-08-25 06:50:48 +0000 |
commit | 4a4b6974a8b6684ecbb429cd947503b6fe78ac39 (patch) | |
tree | 20f90544600b5a9c25a1c6c1b0cd46b8b5990b4f /concurrent | |
parent | 75441481c4e5855f18d1772064e6d5f44b2a3730 (diff) | |
download | futures-4a4b6974a8b6684ecbb429cd947503b6fe78ac39.tar.gz |
Fixed race condition (thanks Ralf Schmitt)2.1.3
Diffstat (limited to 'concurrent')
-rw-r--r-- | concurrent/futures/_base.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/concurrent/futures/_base.py b/concurrent/futures/_base.py index 1d90211..aaefa2b 100644 --- a/concurrent/futures/_base.py +++ b/concurrent/futures/_base.py @@ -122,8 +122,7 @@ class _AllCompletedWaiter(_Waiter): super(_AllCompletedWaiter, self).__init__() def _decrement_pending_calls(self): - self.num_pending_calls -= 1 - if not self.num_pending_calls: + if self.num_pending_calls == len(self.finished_futures): self.event.set() def add_result(self, future): |