Module: RailsDevelopmentBoost::Async
Defined Under Namespace
Classes: Reactor
Constant Summary collapse
- MONITOR =
Monitor.new
Instance Method Summary collapse
Instance Method Details
#heartbeat_check! ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rails_development_boost/async.rb', line 10 def heartbeat_check! if @reactor unless @reactor.alive? @reactor.stop @reactor = nil start! end re_raise_unload_error_if_any else start! end @unloaded_something.tap { @unloaded_something = false } end |
#synchronize ⇒ Object
24 25 26 |
# File 'lib/rails_development_boost/async.rb', line 24 def synchronize MONITOR.synchronize { yield } end |