Module: Couchbase::ForkHooks

Defined in:
lib/couchbase/fork_hooks.rb

Instance Method Summary collapse

Instance Method Details

#_forkObject



19
20
21
22
23
24
25
26
27
28
# File 'lib/couchbase/fork_hooks.rb', line 19

def _fork
  Couchbase::Backend.notify_fork(:prepare)
  pid = super
  if pid
    Couchbase::Backend.notify_fork(:parent)
  else
    Couchbase::Backend.notify_fork(:child)
  end
  pid
end