On 05/18/15 08:01, Andrew Gaydenko wrote:
Magnus, hi!Thanks for the suggestions! On Monday, May 18, 2015 at 3:57:00 PM UTC+3, Magnus Andersson wrote: 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.I'm trying to implement it just now. To keep collection holding uncompleted futures limited I must cleanup the collection (say, on every new message received). The only way is to use fu.isCompleted, and official documentation says it will result in non deterministic flow. So, I'm in doubt. What do you think?
How about piping the result of the future back to actor1, then send the result to actor2? you can prune the completed future in actor1 when it receives the result.
-Michael --
--- You received this message because you are subscribed to the Google Groups "Akka User List" group.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
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.
