This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients pitrou, rhettinger
Date 2013-03-08.06:16:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Condition variables implement a FIFO queue for waiting threads.  The current implementation uses a regular Python list but could use a deque instead.

A wait() call appends a new waiter.   A notify() call removes the oldest waiter; this is an O(n) operation on list but only an O(1) operation on deques.  A notify_all() call is O(n**2) for a list but only O(n) for a deque.

If there is interest in this patch, I can add slicing support to collections.deque so that this patch won't need itertools.islice()
Date User Action Args
2013-03-08 06:16:26rhettingersetrecipients: + rhettinger, pitrou
2013-03-08 06:16:26rhettingersetmessageid: <>
2013-03-08 06:16:26rhettingerlinkissue17385 messages
2013-03-08 06:16:26rhettingercreate