123456789_123456789_123456789_123456789_123456789_

Module: ActiveSupport::ForkTracker

Do not use. This module is for internal use only.
Relationships & Source Files
Namespace Children
Modules:
Defined in: activesupport/lib/active_support/fork_tracker.rb

Class Method Summary

Class Method Details

.after_fork(&block)

[ GitHub ]

  
# File 'activesupport/lib/active_support/fork_tracker.rb', line 31

def after_fork(&block)
  @callbacks << block
  block
end

.after_fork_callback

[ GitHub ]

  
# File 'activesupport/lib/active_support/fork_tracker.rb', line 19

def after_fork_callback
  new_pid = Process.pid
  if @pid != new_pid
    @callbacks.each(&:call)
    @pid = new_pid
  end
end

.hook!

[ GitHub ]

  
# File 'activesupport/lib/active_support/fork_tracker.rb', line 27

def hook!
  ::Process.singleton_class.prepend(CoreExt)
end

.unregister(callback)

[ GitHub ]

  
# File 'activesupport/lib/active_support/fork_tracker.rb', line 36

def unregister(callback)
  @callbacks.delete(callback)
end