From 7824a7cc7a29e0537f94cb1f2eb23cc778181740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 11 Oct 2022 15:27:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kiri-actor/Actor.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/kiri-actor/Actor.php b/kiri-actor/Actor.php index 1ed9e9b2..6907e112 100644 --- a/kiri-actor/Actor.php +++ b/kiri-actor/Actor.php @@ -70,6 +70,15 @@ abstract class Actor implements ActorInterface, JsonSerializable } + /** + * @return void + */ + public function init(): void + { + + } + + /** * @param $id * @return static @@ -115,6 +124,7 @@ abstract class Actor implements ActorInterface, JsonSerializable public function run(): void { $this->setState(ActorState::BUSY); + $this->init(); $this->loop(); $this->setState(ActorState::IDLE); }