The Lifecycle of the Actor System does manage futures you spawn within your Actors. You have to manage that yourself.
Two suggestions: 1. Keep track of running futures in your actor1 in a var. When your actor enters poststop you can await the completion of all referenced futures. You probably would have to adjust so that after piping the message to actor2 you also remove the reference to the future. 2. Spawn a new child actor for this specific task instead of using a future. Your task is now part of the actor life cycle and will be a child to your actor1. The actor will have to terminate itself upon completing the task. /Magnus Den måndag 18 maj 2015 kl. 13:04:41 UTC+2 skrev Andrew Gaydenko: > > HI! > > Say, we have actor1 calling a function on received message returning > Future[T]. > Then this actor1 pipes the future to actor2. > And the last one does some final work on T. > > I have not found a way to gracefully shutdown such actor system (say, with > attached shutdown > hook for daemonic actor system) having in hands a demand to process > already piped messages > (that is to complete all generated futures). > > Have you? > > -- >>>>>>>>>> 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.
