February 2018
Intermediate to advanced
552 pages
13h 46m
English
Creating an ActorSystem is too expensive, because it takes a lot of resources and memory to initialize and work properly, so it's better to avoid creating a new one each time we need it.
After finishing our job and if we don't need the ActorSystem, we should shut it down using the following function:
actorSystem.terminate actorSystem1.terminate actorSystem2.terminate
When we execute ActorSystem.terminate(), before shutting down the system, it will stop all its child Actors (which are created using this ActorSystem), otherwise, JVM will run forever and never stop it.
Read now
Unlock full access