smpl.parallel.Process¶
- class smpl.parallel.Process(group=None, target=None, name=None, args=(), kwargs={}, *, daemon=None)[source]¶
Bases:
BaseProcess- __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
authkeyReturn whether process is a daemon
Return exit code of process or None if it has yet to stop
Return identifier (PID) of process or None if it has yet to start
nameReturn identifier (PID) of process or None if it has yet to start
Return a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.
- 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
- property ident¶
Return identifier (PID) of process or None if it has yet to start
- 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 pid¶
Return identifier (PID) of process or None if it has yet to start
- 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()