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?

>
>    1. 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.
>
> Unfortunately, the task returning future is a call to external library 
API, so I can not redesign it.

-- 
>>>>>>>>>>      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+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to