'Initialise with a task function and arguments.
The arguments are passed to task when it is started.
The task function may be a co-routine that yields control flow between
steps.
If the task co-routine wishes to be advanced only on every nth step of
the TaskRunner, it may yield an integer which is the period of the
task. e.g. "yield 2" will result in the task being advanced on every
second step.'

def __init__(self, task, *args, **kwargs):

    assert callable(task), 'Task    is    not    callable'
    self._task = task
    self._args = args
    self._kwargs = kwargs
    self._runner = None
    self._done = False
    self._timeout = None
    self._poll_period = 1
    self.name = task_description(task)
