Methods
- done_running
- done_unloading
- loading
- permit_concurrent_loads
- running
- start_running
- start_unloading
- unloading
Instance Public methods
done_running()
📝 Source code
# File activesupport/lib/active_support/dependencies/interlock.rb, line 32
def done_running
@lock.stop_sharing
end
🔎 See on GitHub
done_unloading()
📝 Source code
# File activesupport/lib/active_support/dependencies/interlock.rb, line 24
def done_unloading
@lock.stop_exclusive(compatible: [:load, :unload])
end
🔎 See on GitHub
loading(&block)
📝 Source code
# File activesupport/lib/active_support/dependencies/interlock.rb, line 12
def loading(&block)
@lock.exclusive(purpose: :load, compatible: [:load], after_compatible: [:load], &block)
end
🔎 See on GitHub
permit_concurrent_loads(&block)
📝 Source code
# File activesupport/lib/active_support/dependencies/interlock.rb, line 40
def permit_concurrent_loads(&block)
@lock.yield_shares(compatible: [:load], &block)
end
🔎 See on GitHub
running(&block)
📝 Source code
# File activesupport/lib/active_support/dependencies/interlock.rb, line 36
def running(&block)
@lock.sharing(&block)
end
🔎 See on GitHub
start_running()
📝 Source code
# File activesupport/lib/active_support/dependencies/interlock.rb, line 28
def start_running
@lock.start_sharing
end
🔎 See on GitHub
start_unloading()
📝 Source code
# File activesupport/lib/active_support/dependencies/interlock.rb, line 20
def start_unloading
@lock.start_exclusive(purpose: :unload, compatible: [:load, :unload])
end
🔎 See on GitHub
unloading(&block)
📝 Source code
# File activesupport/lib/active_support/dependencies/interlock.rb, line 16
def unloading(&block)
@lock.exclusive(purpose: :unload, compatible: [:load, :unload], after_compatible: [:load, :unload], &block)
end
🔎 See on GitHub