Module: ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin
Do not use. This module is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | activesupport/lib/active_support/concurrency/load_interlock_aware_monitor.rb |
Constant Summary
-
EXCEPTION_IMMEDIATE =
private
# File 'activesupport/lib/active_support/concurrency/load_interlock_aware_monitor.rb', line 9{ Exception => :immediate }.freeze
-
EXCEPTION_NEVER =
private
# File 'activesupport/lib/active_support/concurrency/load_interlock_aware_monitor.rb', line 8{ Exception => :never }.freeze
Instance Method Summary
-
#mon_enter
Enters an exclusive section, but allows dependency loading while blocked.
- #synchronize(&block)
Instance Method Details
#mon_enter
Enters an exclusive section, but allows dependency loading while blocked
# File 'activesupport/lib/active_support/concurrency/load_interlock_aware_monitor.rb', line 13
def mon_enter mon_try_enter || ActiveSupport::Dependencies.interlock.permit_concurrent_loads { super } end
#synchronize(&block)
[ GitHub ]# File 'activesupport/lib/active_support/concurrency/load_interlock_aware_monitor.rb', line 18
def synchronize(&block) Thread.handle_interrupt(EXCEPTION_NEVER) do mon_enter begin Thread.handle_interrupt(EXCEPTION_IMMEDIATE, &block) ensure mon_exit end end end