Hi,
I got  response from ask command but  i don't want to send that future 
response to another actor,I converted (Typecast) that future response as 
List and i return that list, for that i  used *await.result* but it is 
*blocking* the current thread .Can you help me to find the way to get 
future response *without blocking* and that can be *typecast to List*.

My java code is like:

          public List<Contact> getContactList(){
            List<Contact> result = new ArrayList<>();
            Timeout timeout = new Timeout(Duration.create(5, "seconds"));
            String msg="hello";
            Future<Object> future = Patterns.ask(contactActor, msg, 
timeout);
            try{
                 result = (List<Contact> ) Await.result(future, 
timeout.duration());
                }catch (Exception e){
                    e.printStackTrace();
                }
            return result;
            
        }
    
 

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to