Closed Bethibande closed 5 months ago
Done, if an id is specified when creating an actor and the id is already in use, the LocalActorSystem will now throw a IllegalStateException. In order to prevent random exceptions, there now is a exists(ActorId) function.
Task
Motivation
The ActorSystem needs to store a reference to all actors it created, until they are closed. Currently it is possible to create two actors with the same id, possibly allowing two instances of the same actor to exist at the same time. In order to fix this the ActorSystem will need to have a list of map of all the actors it created and their ids. This will allow the ActorSystem to just return an existing instance if an actor with an existing id is created.