Warning
Keep in mind that an actor stopping and its name being deregistered are separate events which happen asynchronously from each other. Therefore it may be that you will find the name still in use after
gracefulStop()
returned. In order to guarantee proper deregistration, only reuse names from within a supervisor you control and only in response to aTerminated
message, i.e. not for top-level actors.
"stop self when finished" in {
val fetcher = system.actorOf(EventFetcherActor.props(eventId), "name1")
watch(fetcher)
// interact with the actor, it will call context.stop(self) after interaction
expectTerminated
(fetcher)
system.actorOf(EventFetcherActor.props(eventId), "name1") //Exception thrown
}
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
--
Cheers,√