This commit is contained in:
2021-02-26 19:04:53 +08:00
parent 96b6717a1e
commit e0a51e783a
2 changed files with 2 additions and 10 deletions
+2 -9
View File
@@ -63,15 +63,8 @@ class OnWorkerStart extends Callback
if ($sigkill === false) {
return $server->stop($workerId);
}
while (true) {
$context = Coroutine::getContext(Coroutine::getPcid());
if (!isset($context['isComplete'])) {
break;
}
$content = $context['isComplete'];
if ($content === true) {
break;
}
while ($server->stats()['coroutine_num'] > 0) {
Coroutine::sleep(0.01);
}
return $server->stop($workerId);
});