[issue14406] Race condition in concurrent.futures

Ralf Schmitt report at bugs.python.org
Mon Aug 20 15:10:06 CEST 2012


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)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14406>
_______________________________________


More information about the Python-bugs-list mailing list