Lines Matching defs:Queue
35 __all__ = ['Queue', 'SimpleQueue', 'JoinableQueue']
45 from Queue import Empty, Full
53 # Queue type using a pipe, buffer and thread
56 class Queue(object):
74 register_after_fork(self, Queue._after_fork)
87 debug('Queue._after_fork()')
164 debug('Queue.join_thread()')
170 debug('Queue.cancel_join_thread()')
178 debug('Queue._start_thread()')
183 target=Queue._feed,
197 self._thread, Queue._finalize_join,
202 # Send sentinel to the thread queue object when garbage collected
204 self, Queue._finalize_close,
211 debug('joining queue thread')
215 debug('... queue thread joined')
217 debug('... queue thread already dead')
221 debug('telling queue thread to quit')
278 info('error in queue thread: %s', e)
288 # A queue type which also supports join() and task_done() methods
295 class JoinableQueue(Queue):
298 Queue.__init__(self, maxsize)
303 return Queue.__getstate__(self) + (self._cond, self._unfinished_tasks)
306 Queue.__setstate__(self, state[:-2])
345 # Simplified Queue type -- really just a locked pipe