Ah, so you're using Await -inside- the Future?
You said previously " This service calls an actor and because it is
synchronous I have to await result..."
I'd make it look like this instead:
Future { doSth } flatMap {
callMethodWithOUTAwaitInsideButInsteadReturnsItsFuture } map doSthMore
On Fri, Nov 7, 2014 at 11:22 PM, Bartek Kowalik <[email protected]>
wrote:
> My call stack looks like that:
>
> controller -> ask actor -> future with pipeTo inside actor -> inside
> future:
> doSth
> callMethodWithAwaitInside
> doSthMore
>
> and also this method "callMethodWithAwaitInside" is used in synchronous
> parts of the system.
>
> W dniu piątek, 7 listopada 2014 22:17:11 UTC+1 użytkownik √ napisał:
>>
>> I don't understand why you'd have to call await.
>>
>> inside your actor:
>>
>> def receive = {
>> case something =>
>> callSomeServiceThatReturnsAFuture pipeTo sender
>> }
>>
>>
>> On Fri, Nov 7, 2014 at 8:55 PM, Bartek Kowalik <[email protected]>
>> wrote:
>>
>>> Yes I know but this is synchronous service run from actor inside future.
>>> This service calls an actor and because it is synchronous I have to await
>>> result... I want to avoid rewriting 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 [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.
>>>
>>
>>
>>
>> --
>> Cheers,
>> √
>>
> --
> >>>>>>>>>> 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.
>
--
Cheers,
√
--
>>>>>>>>>> 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.