Method: XPool::Process#restart

Defined in:
lib/xpool/process.rb

#restartFixnum

Restart the process. The current process shuts down(gracefully) and a new process replaces it. If the current process has failed the new process will inherit its message queue.

Returns:

  • (Fixnum)

    Returns the process ID of the new process.



127
128
129
130
131
# File 'lib/xpool/process.rb', line 127

def restart
  _shutdown 'SIGUSR1', false
  reset(false)
  @id = spawn
end