跳至内容 跳至搜索
方法
D
L
P
R
S
U

实例公有方法

done_running()

# File activesupport/lib/active_support/dependencies/interlock.rb, line 32
def done_running
  @lock.stop_sharing
end

done_unloading()

# File activesupport/lib/active_support/dependencies/interlock.rb, line 24
def done_unloading
  @lock.stop_exclusive(compatible: [:load, :unload])
end

loading(&block)

# File activesupport/lib/active_support/dependencies/interlock.rb, line 12
def loading(&block)
  @lock.exclusive(purpose: :load, compatible: [:load], after_compatible: [:load], &block)
end

permit_concurrent_loads(&block)

# File activesupport/lib/active_support/dependencies/interlock.rb, line 40
def permit_concurrent_loads(&block)
  @lock.yield_shares(compatible: [:load], &block)
end

running(&block)

# File activesupport/lib/active_support/dependencies/interlock.rb, line 36
def running(&block)
  @lock.sharing(&block)
end

start_running()

# File activesupport/lib/active_support/dependencies/interlock.rb, line 28
def start_running
  @lock.start_sharing
end

start_unloading()

# File activesupport/lib/active_support/dependencies/interlock.rb, line 20
def start_unloading
  @lock.start_exclusive(purpose: :unload, compatible: [:load, :unload])
end

unloading(&block)

# 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