From 6dd6dfdcf36ce0dce3a886ed17a27e1f5042cbdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 4 Apr 2023 13:55:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Server.php b/Server.php index 575dd8c..a5fd186 100644 --- a/Server.php +++ b/Server.php @@ -54,7 +54,7 @@ class Server extends HttpService * @throws Exception */ public function __construct(public State $state, - public CoroutineServer $manager, + public AsyncServer $manager, public ContainerInterface $container, public ProcessManager $processManager, public EventDispatch $dispatch, @@ -72,10 +72,10 @@ class Server extends HttpService */ public function init(): void { -// $enable_coroutine = Config::get('server.settings.enable_coroutine', false); -// if (!$enable_coroutine) { -// return; -// } + $enable_coroutine = Config::get('server.settings.enable_coroutine', false); + if (!$enable_coroutine) { + return; + } Coroutine::set([ 'hook_flags' => SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_BLOCKING_FUNCTION, 'enable_deadlock_check' => FALSE,