Namespace
Module
Class
- ActiveSupport::Dependencies::ClassCache
- ActiveSupport::Dependencies::Interlock
- ActiveSupport::Dependencies::WatchStack
Methods
Class Public methods
load_interlock()
Execute the supplied block while holding an exclusive lock, preventing any other thread from being inside a run_interlock block at the same time.
📝 Source code
# File activesupport/lib/active_support/dependencies.rb, line 38
def self.load_interlock
Dependencies.interlock.loading { yield }
end
🔎 See on GitHub
run_interlock()
Execute the supplied block without interference from any concurrent loads.
📝 Source code
# File activesupport/lib/active_support/dependencies.rb, line 31
def self.run_interlock
Dependencies.interlock.running { yield }
end
🔎 See on GitHub
unload_interlock()
Execute the supplied block while holding an exclusive lock, preventing any other thread from being inside a run_interlock block at the same time.
📝 Source code
# File activesupport/lib/active_support/dependencies.rb, line 45
def self.unload_interlock
Dependencies.interlock.unloading { yield }
end
🔎 See on GitHub