This commit is contained in:
xl
2024-09-04 10:14:31 +08:00
parent 95254ac300
commit 526256302d
+2 -10
View File
@@ -39,17 +39,9 @@ class ActorProcess extends AbstractProcess
/** /**
* @return $this * @return void
*/ */
public function onSigterm(): static public function onSigterm(): void
{ {
// TODO: Implement onSigterm() method.
Coroutine::create(function () {
$sign = Coroutine::waitSignal(SIGINT | SIGTERM);
if ($sign) {
$this->onShutdown(true);
}
});
return $this;
} }
} }