Module: ActiveSupport::ForkTracker
- Defined in:
- activesupport/lib/active_support/fork_tracker.rb
Overview
Defined Under Namespace
Modules: CoreExt, CoreExtPrivate
Class Method Summary
collapse
Class Method Details
.after_fork(&block) ⇒ Object
46
47
48
49
|
# File 'activesupport/lib/active_support/fork_tracker.rb', line 46
def after_fork(&block)
@callbacks << block
block
end
|
30
31
32
33
34
35
|
# File 'activesupport/lib/active_support/fork_tracker.rb', line 30
def check!
if @pid != Process.pid
@callbacks.each(&:call)
@pid = Process.pid
end
end
|
.unregister(callback) ⇒ Object
51
52
53
|
# File 'activesupport/lib/active_support/fork_tracker.rb', line 51
def unregister(callback)
@callbacks.delete(callback)
end
|