Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/PhutilDaemonPool.php
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | private function newDaemon() { | ||||
return $daemon; | return $daemon; | ||||
} | } | ||||
public function getDaemons() { | public function getDaemons() { | ||||
return $this->daemons; | return $this->daemons; | ||||
} | } | ||||
public function getFutures() { | |||||
$futures = array(); | |||||
foreach ($this->getDaemons() as $daemon) { | |||||
$future = $daemon->getFuture(); | |||||
if ($future) { | |||||
$futures[] = $future; | |||||
} | |||||
} | |||||
return $futures; | |||||
} | |||||
public function didReceiveSignal($signal, $signo) { | public function didReceiveSignal($signal, $signo) { | ||||
switch ($signal) { | switch ($signal) { | ||||
case PhutilDaemonOverseer::SIGNAL_GRACEFUL: | case PhutilDaemonOverseer::SIGNAL_GRACEFUL: | ||||
case PhutilDaemonOverseer::SIGNAL_TERMINATE: | case PhutilDaemonOverseer::SIGNAL_TERMINATE: | ||||
$this->inShutdown = true; | $this->inShutdown = true; | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 227 Lines • Show Last 20 Lines |