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.
91 92 93 |
# File 'lib/rails/application/finisher.rb', line 91 def initialize(monitor = Monitor.new) @monitor = monitor end |
Instance Method Details
#complete(_state) ⇒ Object
99 100 101 |
# File 'lib/rails/application/finisher.rb', line 99 def complete(_state) @monitor.exit end |
#run ⇒ Object
95 96 97 |
# File 'lib/rails/application/finisher.rb', line 95 def run @monitor.enter end |