Lines Matching refs:item

44         # Notify not_empty whenever an item is added to the queue; a
48 # Notify not_full whenever an item is removed from the queue;
66 for every item that had been put() into the queue).
82 The count of unfinished tasks goes up whenever an item is added to the
84 to indicate the item was retrieved and all work on it is complete.
122 def put(self, item, block=True, timeout=None):
123 '''Put an item into the queue.
129 Otherwise ('block' is false), put an item on the queue if a free slot
150 self._put(item)
155 '''Remove and return an item from the queue.
158 block if necessary until an item is available. If 'timeout' is
160 the Empty exception if no item was available within that time.
161 Otherwise ('block' is false), return an item if one is immediately
181 item = self._get()
183 return item
185 def put_nowait(self, item):
186 '''Put an item into the queue without blocking.
188 Only enqueue the item if a free slot is immediately available.
191 return self.put(item, block=False)
194 '''Remove and return an item from the queue without blocking.
196 Only get an item if one is immediately available. Otherwise
212 # Put a new item in the queue
213 def _put(self, item):
214 self.queue.append(item)
216 # Get an item from the queue
235 def _put(self, item):
236 heappush(self.queue, item)
251 def _put(self, item):
252 self.queue.append(item)
272 def put(self, item, block=True, timeout=None):
273 '''Put the item on the queue.
278 self._queue.append(item)
282 '''Remove and return an item from the queue.
285 block if necessary until an item is available. If 'timeout' is
287 the Empty exception if no item was available within that time.
288 Otherwise ('block' is false), return an item if one is immediately
298 def put_nowait(self, item):
299 '''Put an item into the queue without blocking.
301 This is exactly equivalent to `put(item, block=False)` and is only provided
304 return self.put(item, block=False)
307 '''Remove and return an item from the queue without blocking.
309 Only get an item if one is immediately available. Otherwise