Module: kernel.taskclient

Inheritance diagram for IPython.kernel.taskclient:

A blocking version of the task client.



class IPython.kernel.taskclient.BlockingTaskClient(task_controller)

Bases: object

A blocking task client that adapts a non-blocking one.


Abort a task by taskid.

Parameters :
taskid : int

The taskid of the task to be aborted.


Block until a set of tasks are completed.

Parameters :
taskids : list, tuple

A sequence of taskids to block on.


Clear all previously run tasks from the task controller.

This is needed because the task controller keep all task results in memory. This can be a problem is there are many completed tasks. Users should call this periodically to clean out these cached task results.


Get a task result by taskid.

Parameters :
taskid : int

The taskid of the task to be retrieved.

block : boolean

Should I block until the task is done?

Returns :

A TaskResult object that encapsulates the task result.


Apply func to *sequences elementwise. Like Python’s builtin map.

This version is load balanced.


Create an IMapper implementer with a given set of arguments.

The IMapper created using a task controller is load balanced.

See the documentation for IPython.kernel.task.BaseTask for documentation on the arguments to this method.


Get a dictionary with the current state of the task queue.

Parameters :
verbose : boolean

If True, return a list of taskids. If False, simply give the number of tasks with each status.

Returns :

A dict with the queue status.


Run a task on the TaskController.

See the documentation of the MapTask and StringTask classes for details on how to build a task of different types.

Parameters :task : an ITask implementer
Returns :The int taskid of the submitted task. Pass this to get_task_result to get the TaskResult object.

Touch the scheduler, to resume scheduling without submitting a task.

This method only needs to be called in unusual situations where the scheduler is idle for some reason.


class IPython.kernel.taskclient.IBlockingTaskClient(name, bases=(), attrs=None, __doc__=None, __module__=None)

Bases: zope.interface.Interface

A vague interface of the blocking task client

classmethod __init__()

Table Of Contents

Previous topic


Next topic


This Page