|
RadCluster
Graph-based cluster dynamics for irradiated materials
|
Collaboration diagram for py_utils.simulation._InterruptDeferred:Public Member Functions | |
| __init__ (self, msg=('Ctrl+C — finishing pending writes before exit. ' 'Press Ctrl+C again to force-abort.')) | |
| __enter__ (self) | |
| __exit__ (self, exc_type, exc, tb) | |
Protected Member Functions | |
| _handler (self, signum, frame) | |
Protected Attributes | |
| _msg | |
| _caught | |
| _prev | |
| _active | |
| _handler | |
Defer SIGINT through a critical save block. First Ctrl+C inside the block prints a notice and continues — the save finishes flushing partial output, then KeyboardInterrupt is re-raised on exit. A second Ctrl+C inside the same block restores the default handler so the user can force-abort if a save step is hung. Only used in main-thread Python contexts; signal.signal raises ValueError off the main thread, so we silently fall back to a no-op.
Definition at line 126 of file simulation.py.
| py_utils.simulation._InterruptDeferred.__init__ | ( | self, | |
msg = ('Ctrl+C — finishing pending writes before exit. '
'Press Ctrl+C again to force-abort.') |
|||
| ) |
Definition at line 139 of file simulation.py.
| py_utils.simulation._InterruptDeferred.__enter__ | ( | self | ) |
Definition at line 146 of file simulation.py.
| py_utils.simulation._InterruptDeferred.__exit__ | ( | self, | |
| exc_type, | |||
| exc, | |||
| tb | |||
| ) |
Definition at line 172 of file simulation.py.
|
protected |
Definition at line 156 of file simulation.py.
|
protected |
Definition at line 144 of file simulation.py.
|
protected |
Definition at line 142 of file simulation.py.
|
protected |
Definition at line 149 of file simulation.py.
|
protected |
Definition at line 141 of file simulation.py.
|
protected |
Definition at line 143 of file simulation.py.