yaocptool.parallel package

Submodules

yaocptool.parallel.worker module

class Worker(obj_class, obj_arg, function_name, queue_in, queue_out)[source]

Bases: multiprocessing.context.Process

Creates new process that creates and object of class ‘obj_class’ with ‘obj_arg’ argument. It will consume one element from each queue_in and call function ‘function_name’ the consumed elements as argument. It will put the return of the ‘function_name’ call in all Queues in queue_out

__init__(obj_class, obj_arg, function_name, queue_in, queue_out)[source]

Initialize self. See help(type(self)) for accurate signature.

run()[source]

Method to be run in sub-process; can be overridden in sub-class

Module contents