mltk.utils.signal_handler.SignalHandler

class SignalHandler[source]

Class to detect OS signals

e.g. detect when CTRL+C is pressed and issue a callback

See the source code on Github: mltk/utils/signal_handler.py

Methods

__init__

release

__init__(sig=Signals.SIGINT, callback=None, resignal_on_exit=False, raise_exception_if_not_main_thread=True)[source]