改名
This commit is contained in:
@@ -68,9 +68,10 @@ class ServerManager
|
|||||||
*/
|
*/
|
||||||
protected static function createProcess($process, $application, $pool, $workerId)
|
protected static function createProcess($process, $application, $pool, $workerId)
|
||||||
{
|
{
|
||||||
|
$application->set($pool->getProcess($workerId));
|
||||||
$process = new $process($application);
|
$process = new $process($application);
|
||||||
$application->debug(sprintf('Worker #%d is running.', $workerId));
|
$application->debug(sprintf('Worker #%d is running.', $workerId));
|
||||||
return $process->start($pool->getProcess($workerId));
|
return $process->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,13 +38,11 @@ abstract class Process extends Component
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $process
|
|
||||||
*/
|
*/
|
||||||
protected function start($process)
|
protected function start()
|
||||||
{
|
{
|
||||||
do {
|
$_process = new \Swoole\Process([$this, 'onHandler'], false, null, true);
|
||||||
$this->onHandler($process);
|
$_process->start();
|
||||||
} while (true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user