There is an undefined amount of time it takes to traverse the actor paths
and kill the actor. The following code fails without the sleep.
Using akka 2.1.2 here fyi.
system.actorOf(Props(new Actor {
def receive = {
case "hi" => sender ! "hi back"
}
}), "hi-actor")
system.actorFor("/user/hi-actor") ! PoisonPill
Thread.sleep(100)
system.actorOf(Props(new Actor {
def receive = {
case "hi" => sender ! "hi back"
}
}), "hi-actor")
On Thursday, April 24, 2014 2:09:16 PM UTC-4, Chanan Braunstein wrote:
>
> I tried for the fun of it a thread.sleep 5000 prior to getting the actor
> after a restart. that didn't help. Although, even if it did help I would
> argue, it would just prove that there is a bug because I should need to
> resort to such measures.
>
--
>>>>>>>>>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.