Class: ActiveSupport::Dependencies::Interlock
Relationships & Source Files | |
Inherits: | Object |
Defined in: | activesupport/lib/active_support/dependencies/interlock.rb |
Instance Method Summary
Instance Method Details
#done_running
[ GitHub ]# File 'activesupport/lib/active_support/dependencies/interlock.rb', line 36
def done_running @lock.stop_sharing end
#done_unloading
[ GitHub ]# File 'activesupport/lib/active_support/dependencies/interlock.rb', line 28
def done_unloading @lock.stop_exclusive(compatible: [:load, :unload]) end
#loading
[ GitHub ]#permit_concurrent_loads
[ GitHub ]# File 'activesupport/lib/active_support/dependencies/interlock.rb', line 46
def permit_concurrent_loads @lock.yield_shares(compatible: [:load]) do yield end end
#running
[ GitHub ]# File 'activesupport/lib/active_support/dependencies/interlock.rb', line 40
def running @lock.sharing do yield end end
#start_running
[ GitHub ]# File 'activesupport/lib/active_support/dependencies/interlock.rb', line 32
def start_running @lock.start_sharing end
#start_unloading
[ GitHub ]# File 'activesupport/lib/active_support/dependencies/interlock.rb', line 24
def start_unloading @lock.start_exclusive(purpose: :unload, compatible: [:load, :unload]) end