mstar.utils.orphan#
Watchdog that leaves once the process that spawned this one is gone.
Functions
|
Exit this process once |
|
Start |
- mstar.utils.orphan.exit_when_orphaned(who, parent_name, stop_signal, parent=None, poll_s=0.5, grace_s=5.0)[source]#
Exit this process once
parentdies, so nothing outlives its parent holding GPU memory or IPC handles.Each parent terminates its children on every exit path it controls; this covers the one it cannot (killed outright).
stop_signalis the graceful stop for this process, but a main thread stuck in a C call cannot service it, so exit hard aftergrace_s.