From 79967e3dbe75ea93177465654b7f588f2560a979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 2 Sep 2020 11:45:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- system/Process/Process.php | 42 -------------------------------------- 1 file changed, 42 deletions(-) diff --git a/system/Process/Process.php b/system/Process/Process.php index 0833ee26..4f7b30a4 100644 --- a/system/Process/Process.php +++ b/system/Process/Process.php @@ -17,46 +17,4 @@ use Swoole\Process\Pool; abstract class Process extends Component { - /** @var Application */ - protected $application; - - - /** - * Process constructor. - * @param $application - * @param array $config - */ - public function __construct(Application $application, $config = []) - { - $this->application = $application; - parent::__construct([]); - } - - - /** - * @param \Swoole\Process $process - * @return mixed - */ - abstract public function onHandler(\Swoole\Process $process); - - - /** - * @param $workerId - * @return Socket - * @throws ComponentException - */ - protected function exportSocket($workerId) - { - return $this->application->get(Pool::class)->getProcess($workerId)->exportSocket(); - } - - - /** - */ - protected function start() - { - $_process = new \Swoole\Process([$this, 'onHandler'], false, null, true); - $_process->start(); - } - }