This class maintains a simple running/terminating status, tracks threads and timers created by the application, and ensures they are properly cleaned up when we terminate.
Returns whether application is terminating.
Interrupts all registered threads, and cancels timers.
Returns whether application is terminating. Will
only return true if
terminate() was invoked.
Registers thread. Please ensure thread can be terminated with an interrupt, i.e. interrupts should not be caught and ignored. When interrupted, the thread should proceed to clean itself up and terminate.
Interrupts all registered threads, and cancels timers. This is normally triggered from an application controller when its shutdown.