Package multi :: Module result_commands :: Class Result_command
[hide private]
[frames] | no frames]

type Result_command

source code

Known Subclasses:

A general result command - designed to be subclassed by users.

This is a general result command from a Slave command that will have its run() method called on return to the master processor.


See Also: multi.processor.Slave_command.

Instance Methods [hide private]
 
__init__(self, processor, completed, memo_id=None)
Initialise a result.
source code
 
run(self, processor, memo)
The run method of the result command.
source code
Instance Variables [hide private]

Inherited from misc.Result: completed, memo_id, rank

Method Details [hide private]

__init__(self, processor, completed, memo_id=None)
(Constructor)

source code 

Initialise a result.

This object is designed for subclassing and __init__ should be called via the super() function.

Parameters:
  • processor - Processor the processor instance we are running in.
  • completed - A flag used in batching result returns to indicate that the sequence of batched result commands has completed, the flag should be set by slave_commands. The value should be the value passed to a Slave_commands run method if it is the final result being returned otherwise it should be False.
Overrides: misc.Result.__init__
(inherited documentation)

run(self, processor, memo)

source code 

The run method of the result command.

This method will be called when the result command is processed by the master and should carry out any actions the slave command needs carried out on the master (e.g. save or register results).

Parameters:
  • processor (Processor instance) - The master processor that queued the original Slave_command.
  • memo (Memo instance or None) - A memo that was registered when the original slave command was placed on the queue. This provides local storage on the master.
See Also:
multi.processor.Processor., multi.processor.Slave_command., multi.memo.Memo.