Module: ActiveSupport::Concurrency::LoadInterlockAwareMonitorMixin
- Included in:
- LoadInterlockAwareMonitor
- Defined in:
- activesupport/lib/active_support/concurrency/load_interlock_aware_monitor.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#mon_enter ⇒ Object
Enters an exclusive section, but allows dependency loading while blocked.
- #synchronize(&block) ⇒ Object
Instance Method Details
#mon_enter ⇒ Object
Enters an exclusive section, but allows dependency loading while blocked
13 14 15 16 |
# 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) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# 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 |