Module: Wurk::PidCache::CoreExt

Included in:
Wurk::PidCache
Defined in:
lib/wurk/pid_cache.rb

Overview

Prepended, not aliased: Process._fork is a documented hook (Ruby 3.1+, and Wurk requires 3.2) that several gems wrap, and prepending composes with theirs instead of replacing it.

Instance Method Summary collapse

Instance Method Details

#_forkObject



31
32
33
34
35
# File 'lib/wurk/pid_cache.rb', line 31

def _fork
  child_pid = super
  PidCache.update! if child_pid.zero?
  child_pid
end