commit
3fa067aca6
1 changed files with 4 additions and 1 deletions
|
@ -284,7 +284,10 @@ class OrderedQueue(Queue.PriorityQueue, object):
|
|||
super(OrderedQueue, self).__init__(maxsize)
|
||||
|
||||
def _qsize(self, len=len):
|
||||
try:
|
||||
return len(self.queue) if self.queue[0][0] == self.next_index else 0
|
||||
except IndexError:
|
||||
return 0
|
||||
|
||||
def _get(self, heappop=heapq.heappop):
|
||||
self.next_index += 1
|
||||
|
|
Loading…
Reference in a new issue