改名
This commit is contained in:
@@ -27,7 +27,6 @@ class OnWorkerStart extends Callback
|
||||
/** @var int 重启信号 */
|
||||
private int $signal = SIGUSR1 | SIGUSR2 | SIGKILL;
|
||||
|
||||
private int $hook = SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_BLOCKING_FUNCTION | SWOOLE_HOOK_CURL;
|
||||
|
||||
|
||||
/**
|
||||
@@ -42,10 +41,6 @@ class OnWorkerStart extends Callback
|
||||
{
|
||||
putenv('worker=' . $worker_id);
|
||||
|
||||
Runtime::enableCoroutine(true, $this->hook);
|
||||
|
||||
Coroutine::set(['enable_deadlock_check' => false]);
|
||||
|
||||
if ($worker_id >= $server->setting['worker_num']) {
|
||||
$this->onTask($server, $worker_id);
|
||||
} else {
|
||||
|
||||
@@ -144,6 +144,10 @@ class Server extends HttpService
|
||||
return 'ok';
|
||||
}
|
||||
|
||||
Runtime::enableCoroutine(true, SWOOLE_HOOK_ALL ^ SWOOLE_HOOK_BLOCKING_FUNCTION | SWOOLE_HOOK_CURL);
|
||||
|
||||
Coroutine::set(['enable_deadlock_check' => false]);
|
||||
|
||||
return $baseServer->start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user