123456789_123456789_123456789_123456789_123456789_

Class: Rails::Application::Finisher::MutexHook

Relationships & Source Files
Inherits: Object
Defined in: railties/lib/rails/application/finisher.rb

Class Method Summary

Instance Method Summary

Constructor Details

.new(mutex = Mutex.new) ⇒ MutexHook

[ GitHub ]

  
# File 'railties/lib/rails/application/finisher.rb', line 79

def initialize(mutex = Mutex.new)
  @mutex = mutex
end

Instance Method Details

#complete(_state)

[ GitHub ]

  
# File 'railties/lib/rails/application/finisher.rb', line 87

def complete(_state)
  @mutex.unlock
end

#run

[ GitHub ]

  
# File 'railties/lib/rails/application/finisher.rb', line 83

def run
  @mutex.lock
end