改名
This commit is contained in:
@@ -92,18 +92,21 @@ class OnWorkerStart extends Callback
|
|||||||
* @param $worker_id
|
* @param $worker_id
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function onSignal(Server $server, $worker_id): mixed
|
public function onSignal(Server $server, $worker_id): void
|
||||||
{
|
{
|
||||||
$ret = Coroutine::waitSignal($this->signal, -1);
|
$ret = Coroutine::waitSignal($this->signal, -1);
|
||||||
if ($ret === true) {
|
Coroutine\go(function ($ret, $server, $worker_id) {
|
||||||
$this->ticker();
|
if ($ret === true) {
|
||||||
}
|
$this->ticker();
|
||||||
return $server->stop($worker_id);
|
}
|
||||||
|
return $server->stop($worker_id);
|
||||||
|
}, $ret, $server, $worker_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws ComponentException
|
||||||
*/
|
*/
|
||||||
private function ticker(): void
|
private function ticker(): void
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user