Package Bio :: Package PopGen :: Package Async :: Class Async
[hide private]
[frames] | no frames]

Class Async

source code

object --+
         |
        Async
Known Subclasses:

Abstract Asynchronous execution class.

This is the top abstract class. Concrete classes must implement the _run_program method.

Instance Methods [hide private]
 
__init__(self)
Async constructor.
source code
 
run_program(self, program, parameters, input_files)
Runs a program.
source code
 
_run_program(self, id, program, parameters, input_files)
Actually run the program, handled by a subclass (PRIVATE).
source code
 
get_result(self, id)
Returns the results for a certain Id, the info for that Id is forgotten.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Async constructor.

Initializes the queues, among other things. Of notice, is the access_ds lock for controlling exclusive access to this object.

Overrides: object.__init__

run_program(self, program, parameters, input_files)

source code 

Runs a program.

Real _run_program to be implemented by concrete classes.

parameters: program String identifying program. parameters List of String parameters. input_files Hash of Input file descriptors.

returns: Task Id.

The input_files hash key is the path that is passed to the program. It should always be relative. Value is a stream.

_run_program(self, id, program, parameters, input_files)

source code 

Actually run the program, handled by a subclass (PRIVATE).

This method should be replaced by any derived class to do something useful. It will be called by the run_program method.

get_result(self, id)

source code 

Returns the results for a certain Id, the info for that Id is forgotten.

parameters: id Id of the task.

returns: (return_code, output_files) return code and file access object.

The output_files hash key is a relative file name, and the value a output stream.