Lines Matching refs:queue
3 A mutex has two pieces of state -- a 'locked' bit and a queue.
4 When the mutex is not locked, the queue is empty.
5 Otherwise, the queue contains 0 or more (function, argument) pairs
7 When the mutex is unlocked while the queue is not empty,
8 the first queue entry is removed and its function(argument) pair called,
24 self.queue = deque()
42 function and argument in the queue."""
46 self.queue.append((function, argument))
49 """Unlock a mutex. If the queue is not empty, call the next
51 if self.queue:
52 function, argument = self.queue.popleft()