Module: ActiveSupport::ForkTracker
- Defined in:
- lib/active_support/fork_tracker.rb
Overview
Defined Under Namespace
Modules: CoreExt, CoreExtPrivate
Class Method Summary
collapse
Class Method Details
.after_fork(&block) ⇒ Object
52
53
54
55
|
# File 'lib/active_support/fork_tracker.rb', line 52
def after_fork(&block)
@callbacks << block
block
end
|
36
37
38
39
40
41
|
# File 'lib/active_support/fork_tracker.rb', line 36
def check!
if @pid != Process.pid
@callbacks.each(&:call)
@pid = Process.pid
end
end
|
.unregister(callback) ⇒ Object
57
58
59
|
# File 'lib/active_support/fork_tracker.rb', line 57
def unregister(callback)
@callbacks.delete(callback)
end
|