Class: Rails::Application::Finisher::MonitorHook
- Inherits:
-
Object
- Object
- Rails::Application::Finisher::MonitorHook
- Defined in:
- lib/rails/application/finisher.rb
Overview
:nodoc:
Instance Method Summary collapse
- #complete(_state) ⇒ Object
-
#initialize(monitor = Monitor.new) ⇒ MonitorHook
constructor
A new instance of MonitorHook.
- #run ⇒ Object
Constructor Details
#initialize(monitor = Monitor.new) ⇒ MonitorHook
Returns a new instance of MonitorHook.
97 98 99 |
# File 'lib/rails/application/finisher.rb', line 97 def initialize(monitor = Monitor.new) @monitor = monitor end |
Instance Method Details
#complete(_state) ⇒ Object
105 106 107 |
# File 'lib/rails/application/finisher.rb', line 105 def complete(_state) @monitor.exit end |
#run ⇒ Object
101 102 103 |
# File 'lib/rails/application/finisher.rb', line 101 def run @monitor.enter end |