Method: Tap::App#terminate
- Defined in:
- lib/tap/app.rb
#terminate ⇒ Object
Signals a running application to terminate execution by setting state to TERMINATE. In this state, calls to check_terminate will raise a TerminateError. Run considers TerminateErrors a normal exit and rescues them quietly.
Nodes can set breakpoints that call check_terminate to invoke task-specific termination. If a task never calls check_terminate, then it will continue to completion.
Does nothing if state is READY.
541 542 543 544 |
# File 'lib/tap/app.rb', line 541 def terminate synchronize { @state = State::TERMINATE unless state == State::READY } self end |