From 2f93063a995b10ac4f1ff41228e8f981ccdd98df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 1 Mar 2021 19:18:43 +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 --- HttpServer/Events/OnWorkerStart.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/HttpServer/Events/OnWorkerStart.php b/HttpServer/Events/OnWorkerStart.php index 6a20034e..0678ed31 100644 --- a/HttpServer/Events/OnWorkerStart.php +++ b/HttpServer/Events/OnWorkerStart.php @@ -37,12 +37,6 @@ class OnWorkerStart extends Callback */ public function onHandler(Server $server, int $worker_id): void { - $query['exit_condition'] = function () { - return Coroutine::stats()['coroutine_num'] === 0; - }; - $query['enable_deadlock_check'] = false; - Coroutine::set($query); - putenv('worker=' . $worker_id); if ($worker_id >= $server->setting['worker_num']) { $this->onTask($server, $worker_id); @@ -50,7 +44,7 @@ class OnWorkerStart extends Callback $this->onWorker($server, $worker_id); } $this->debug(sprintf('%s #%d Pid:%d start.', ucfirst(env('environmental')), $worker_id, $server->worker_pid)); -// Coroutine\go([$this, 'onSignal'], $server, $worker_id); + Coroutine\go([$this, 'onSignal'], $server, $worker_id); }