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); }