Package multi :: Module misc :: Class Result
[hide private]
[frames] | no frames]

Class Result

source code


A basic result object returned from a slave processor via return_object.

This a very basic result and shouldn't be overridden unless you are also modifying the process_result method in all the processors in the framework (i.e. currently for implementors only). Most users should override Result_command.

This result basically acts as storage for the following fields completed, memo_id, processor_rank.

Results should only be created on slave processors.


See Also:
multi.processor.return_object., multi.processor.process_result., multi.processor.Result_command.
Instance Methods [hide private]
 
__init__(self, processor, completed)
Initialise a result.
source code

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

Instance Variables [hide private]
  completed
A flag used in batching result returns to indicate that the sequence has completed.
  memo_id
The memo_id of the Slave_command currently being processed on this processor.
  rank
The rank of the current processor, used in command scheduling on the master processor.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, processor, completed)
(Constructor)

source code 

Initialise a result.

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

Parameters:
  • processor (Processor instance) - Processor the processor instance we are running in.
  • completed (bool) - 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: object.__init__

See Also: multi.processor.Processor.

Note: The requirement for the user to know about completed will hopefully disappear with some slight of hand in the Slave_command and it may even disappear completely.


Instance Variable Details [hide private]

completed

A flag used in batching result returns to indicate that the sequence has completed.

This is an optimisation to prevent the sending an extra batched result queue completion result being sent, it may be an over early optimisation.

memo_id

The memo_id of the Slave_command currently being processed on this processor.

This value is set by the return_object method to the current Slave_commands memo_id.