dragon.mpbridge.process

Dragon’s replacement classes for Multiprocessing Process.

Classes

DragonPopen

Dragon's class to spawn/open a new process.

DragonPopenStub

This Popen class replaces the actual DragonPopen in process objects returned to a child process by e.g.

DragonProcess

Dragon's Process uses most of the base process implementation.

PUID

The purpose of this class is to use where such things like a fd (sentinel) and PID are found

class PUID

The purpose of this class is to use where such things like a fd (sentinel) and PID are found

thread_wait(timeout, done_ev, ready)

utility function for wait implementation

Parameters
  • timeout (_type_) – _description_

  • done_ev (_type_) – _description_

  • ready (_type_) – _description_

class DragonPopen

Dragon’s class to spawn/open a new process.

class DragonProcess

Dragon’s Process uses most of the base process implementation.

property ident: int

Property method uniquely identifying the process.

Returns

The p_uid of this process, None if it has not been started.

Return type

int

property pid: int

Property method uniquely identifying the process.

Returns

The p_uid of this process, None if it has not been started.

Return type

int

class DragonPopenStub

This Popen class replaces the actual DragonPopen in process objects returned to a child process by e.g. mp.current_process(). The parent will see the correct DragonPopen class, as they have actually started the child. This class only contains what is necessary to make the process object work for the child with Multiprocessings internal methods that we have not modified.

__init__(p_uid)
poll(flag=1)

So we can show the correct exitcode when printing a process object returned by mp.current_process()