Class: Airflow::SigHandler
- Inherits:
-
Object
- Object
- Airflow::SigHandler
- Includes:
- Utils::Logger
- Defined in:
- lib/async_flow/sig_handler.rb
Constant Summary collapse
- SIGNAL_HANDLERS =
{ "INT" => ->(_subject) { raise Interrupt }, "TERM" => ->(_subject) { raise Interrupt } }.freeze
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(subject) ⇒ SigHandler
constructor
A new instance of SigHandler.
Methods included from Utils::Logger
Constructor Details
#initialize(subject) ⇒ SigHandler
Returns a new instance of SigHandler.
12 13 14 15 |
# File 'lib/async_flow/sig_handler.rb', line 12 def initialize(subject) @subject = subject @read_io, @write_io = IO.pipe end |
Instance Method Details
#call ⇒ Object
17 18 19 20 21 |
# File 'lib/async_flow/sig_handler.rb', line 17 def call trap yield wait end |