变更
This commit is contained in:
@@ -75,6 +75,8 @@ class AsyncServer implements ServerInterface
|
||||
$this->addListener(instance(SConfig::class, [], $rpcService));
|
||||
}
|
||||
$this->processManager->batch(Config::get('processes', []));
|
||||
|
||||
$this->onSignal(Config::get('signal', []));
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -44,7 +44,7 @@ class Server extends HttpService
|
||||
|
||||
/**
|
||||
* @param State $state
|
||||
* @param CoroutineServer $manager
|
||||
* @param AsyncServer $manager
|
||||
* @param ContainerInterface $container
|
||||
* @param ProcessManager $processManager
|
||||
* @param EventDispatch $dispatch
|
||||
@@ -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,
|
||||
@@ -77,9 +77,9 @@ class Server extends HttpService
|
||||
return;
|
||||
}
|
||||
Coroutine::set([
|
||||
'hook_flags' => (SWOOLE_HOOK_ALL | SWOOLE_HOOK_CURL) ^ SWOOLE_HOOK_BLOCKING_FUNCTION,
|
||||
'hook_flags' => (SWOOLE_HOOK_ALL | SWOOLE_HOOK_CURL) ^ SWOOLE_HOOK_BLOCKING_FUNCTION,
|
||||
'enable_deadlock_check' => FALSE,
|
||||
'exit_condition' => function () {
|
||||
'exit_condition' => function () {
|
||||
return Coroutine::stats()['coroutine_num'] === 0;
|
||||
}
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user