dragon.mpbridge.process.DragonProcess
- class DragonProcess
Bases:
BaseProcess
Create and manage a Python process, with a given target function, on a node available to the runtime
- __init__(group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None)
Methods
__init__
([group, target, name, args, ...])close
()Close the Process object.
is_alive
()Return whether process is alive
join
([timeout])Wait until child process terminates
kill
()Terminate process; sends SIGKILL signal or uses TerminateProcess()
run
()Method to be run in sub-process; can be overridden in sub-class
start
()Start child process
Terminate process; sends SIGTERM signal or uses TerminateProcess()
Attributes
Return whether process is a daemon
Return exit code of process or
None
if it has yet to stopProperty method uniquely identifying the process.
Property method uniquely identifying the process.
Return a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.
- 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:
- 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:
- __init__(group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None)
- property authkey
- close()
Close the Process object.
This method releases resources held by the Process object. It is an error to call this method if the child process is still running.
- property daemon
Return whether process is a daemon
- property exitcode
Return exit code of process or
None
if it has yet to stop
- is_alive()
Return whether process is alive
- join(timeout=None)
Wait until child process terminates
- kill()
Terminate process; sends SIGKILL signal or uses TerminateProcess()
- property name
- run()
Method to be run in sub-process; can be overridden in sub-class
- property sentinel
Return a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.
- start()
Start child process
- terminate()
Terminate process; sends SIGTERM signal or uses TerminateProcess()