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.
98 99 100 |
# File 'lib/rails/application/finisher.rb', line 98 def initialize(monitor = Monitor.new) @monitor = monitor end |
Instance Method Details
#complete(_state) ⇒ Object
106 107 108 |
# File 'lib/rails/application/finisher.rb', line 106 def complete(_state) @monitor.exit end |
#run ⇒ Object
102 103 104 |
# File 'lib/rails/application/finisher.rb', line 102 def run @monitor.enter end |