I know that it is unsafe to close the call to the sender
method or the internal state of the actor in the Future or the scheduler, but what about the context of the actor? What is in ActorContext
? Is it safe to close the actor context in the scheduler or future callback, for example?
def receive: Receive = { case Msg => system.scheduler.scheduleOnce(1 second) { context.actorOf[ChildActor] } }
source share