A FIFO queue for tasks. This class is thread-safe.
|
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
|
|
int
|
__len__(self)
Returns:
the number of tasks in the queue |
|
|
|
addTask(self,
task,
in_front=False) |
|
|
Task
Removes the first task from the queue and returns it. If the task
queue is empty, the method blocks until a task becomes available.
|
firstTask(self)
Returns:
the first task in the queue |
|
|
Task
Removes the first task with the given tag from the queue and
returns it. If no task with the requested tag is available, the
method blocks until a matching task becomes available.
|
|
dict
|
taskCount(self)
Returns:
a dictionary listing the number of tasks for each tag |
|
|
Task
Removes the task with the given task_id from the queue and returns
it. If the task is not in the queue, the method blocks until it
becomes available.
|
taskWithId(self,
task_id)
Returns:
the task with the given task_id |
|
|
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|