c.t.t.t.LoggingSource : class documentation

Part of canonical.twistedsupport.tests.test_task View In Hierarchy

Implements interfaces: canonical.twistedsupport.task.ITaskSource

Task source that logs calls to start and stop'
Method __init__ Undocumented
Method start Start generating tasks.
Method stop Stop generating tasks.
def __init__(self, log, stop_deferred=None):
Undocumented
def start(self, consumer):
Start generating tasks.

If start has already been called, then the given 'task_consumer' replaces the existing task accepter.

Parameterstask_consumerA provider of ITaskConsumer.
def stop(self):
Stop generating tasks.

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.

ReturnsA 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.
API Documentation for Launchpad, generated by pydoctor at 2010-03-21 00:00:03.