Part of lp.services.twistedsupport.task View In Hierarchy
This is passed to ITaskConsumer.consume
as a source of tasks to do.
Tasks are nullary callables that might return Deferreds.
Objects that provide this interface must call ITaskConsumer.noTasksFound
if there are no tasks to generate, and call ITaskConsumer.taskStarted
with the nullary callable whenever it generates a task.
If start
has already been called, then the given 'task_consumer'
replaces the existing task accepter.
Parameters | task_consumer | A provider of ITaskConsumer . |
It might not be possible to return instantly, so this method should
return a Deferred with a boolean that indicates whether
ITaskSource.start
was called in the meantime.
Any subsequent calls to stop
are silently ignored.
Returns | A Deferred that will fire when the source is stopped. It is possible that tasks may be produced until this deferred fires. The deferred will fire with a boolean; True if the source is still stopped, False if the source has been restarted since stop() was called. |