[issue17385] Use deque instead of list the threading.Condition waiter queue

Antoine Pitrou report at bugs.python.org
Sun Mar 10 15:11:44 CET 2013


Antoine Pitrou added the comment:

That said, I seem to remember a discussion of Condition's fairness.
Right now, waiters are notified in the order of wait() calls. This wouldn't be the case anymore if using a set instead of a list or deque.

Also, I can't remember a situation where I made an intensive use of a Condition (say, hundreds of calls per second), as opposed to Lock and RLock which can be heavily invoked to protect the integrity of critical data structures.

----------

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


More information about the Python-bugs-list mailing list