For example:

f1 map { result => agent.send(1) }
f2 map { result => agent.send(2) }

The order of the sends depends on how long f1 and f2 take.


I would like an API similar to sendOff, accepting futures:
agent.sendOff(f1 map { 1 })
agent.sendOff(f2 map { 2 })

In this way, the results of f1 and f2 would be applied in order.

On Thursday, February 13, 2014 3:43:14 AM UTC-8, rkuhn wrote:
>
> Hi partycoder,
>
> in which way does your code cause an ordering problem? What do you observe 
> and why is that not as it should be?
>
> Regards,
>
> Roland
>
> 12 feb 2014 kl. 06:36 skrev [email protected] <javascript:>:
>
> Hello,
>
> I have a question.
>
> val f = some future
> val a = Agent(some type)
>
> // This may cause an ordering problem
> f map { result => a.send(result) }
>
> How do I use agent.send/sendOff using futures?
>
> Regards
>
> -- 
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: http://akka.io/faq/
> >>>>>>>>>> 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] <javascript:>.
> To post to this group, send email to [email protected]<javascript:>
> .
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
> *Dr. Roland Kuhn*
> *Akka Tech Lead*
> Typesafe <http://typesafe.com/> – Reactive apps on the JVM.
> twitter: @rolandkuhn
> <http://twitter.com/#!/rolandkuhn>
>  
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: http://akka.io/faq/
>>>>>>>>>>      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/groups/opt_out.

Reply via email to