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