exopy.measurement.engines.process_engine.subprocess module

Subprocess executing the tasks sent by the subprocess engine.

class exopy.measurement.engines.process_engine.subprocess.TaskProcess(pipe, log_queue, monitor_queue, task_pause, task_paused, task_resumed, task_stop, process_stop)[source]

Bases: multiprocessing.context.Process

Process taking care of performing the measurements.

When started this process sets up a logger redirecting all records to a queue. It then redirects stdout and stderr to the logging system. Then as long as it is not stopped it waits for the main process to send a measurements through the pipe. Upon reception of the ConfigObj object describing the measurement it rebuilds it, set up a logger for that specific measurement and if necessary starts a spy transmitting the value of all monitored entries to the main process. It finally run the checks of the measurement and run it. It can be interrupted by setting an event and upon exit close the communication pipe and signal all listeners that it is closing.

  • pipe – Pipe used to communicate with the parent process which is transferring the measurement to perform.

  • log_queue – Queue in which all log records are sent to be procesed later in the main process.

  • monitor_queue – Queue in which all the informations the user asked to monitor during the measurement are sent to be processed in the main process.

  • task_pause – Event set when the user asked the running measurement to pause.

  • task_paused – Event set when the current measurement is paused.

  • task_stop – Event set when the user asked the running measurement to stop.

  • process_stop – Event set when the user asked the process to stop.


Log handler used to save the running measurement specific records.


log handler

see `Parameters`

Method called when the new process starts.


Method called when the new process starts.

For a complete description of the workflow see the class docstring.