модуль ActiveSupport::Dependencies
Публичные методы класса
# File activesupport/lib/active_support/dependencies.rb, line 38
def self.load_interlock
Dependencies.interlock.loading { yield }
end Выполнить переданный блок, удерживая эксклюзивную блокировку, предотвращая выполнение любого другого потока внутри блока run_interlock одновременно.
# File activesupport/lib/active_support/dependencies.rb, line 31
def self.run_interlock
Dependencies.interlock.running { yield }
end Выполнить переданный блок без помех от одновременных загрузок.
# File activesupport/lib/active_support/dependencies.rb, line 45
def self.unload_interlock
Dependencies.interlock.unloading { yield }
end Выполнить переданный блок, удерживая эксклюзивную блокировку, предотвращая выполнение любого другого потока внутри блока run_interlock одновременно.
© 2004–2020 David Heinemeier Hansson
Licensed under the MIT License.