Package mdp :: Package parallel :: Class FlowExecuteCallable
[hide private]
[frames] | no frames]

Class FlowExecuteCallable


Implements data execution through a Flow.

A FlowNode is used to simplify the forking process and to
encapsulate the flow.

Instance Methods [hide private]
 
__call__(self, x)
Return the execution result.
 
__init__(self, flownode, nodenr=None, purge_nodes=True)
Store everything for the execution.
 
fork(self)
Return a fork of this callable, e.g.

Inherited from unreachable.newobject: __long__, __native__, __nonzero__, __unicode__, next

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

    Inherited from FlowTaskCallable
 
setup_environment(self)
Activate the used extensions.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, x)
(Call operator)

 
Return the execution result.

x -- data chunk

If use_fork_execute is True for the flownode then it is returned
in the result tuple.

Overrides: TaskCallable.__call__

__init__(self, flownode, nodenr=None, purge_nodes=True)
(Constructor)

 
Store everything for the execution.

flownode -- FlowNode for the execution
nodenr -- optional nodenr argument for the flow execute method
purge_nodes -- If True nodes not needed for the join will be replaced
    with dummy nodes to reduce the footprint.

Overrides: object.__init__

fork(self)

 
Return a fork of this callable, e.g. by making a copy.

This method is always called exactly once before a callable is called,
so instead of the original callable a fresh fork is called. This
ensures that the original callable is preserved when caching is used.
If the callable is not modified by the call then it can simply return
itself.

Overrides: TaskCallable.fork
(inherited documentation)