On 20/02/2017 21:27, Rafał Krzewski wrote:
Why use await, when pipeTo pattern provides clean, non-blocking integration between Futures and Actors? As far as I know, the only situation when blocking in actor code is justifiable is interacting with legacy code that just blocks the calling thread and offers no way around it, like JDBC does. Of course one should use a dedicated dispatcher then, to avoid starving regular actors of resources.
I used it at one point when I was reading a numeric value from an actor that I then used in a calculation before passing the value back to the source actor in a subsequent message. I got rid of the need to use await by just pushing the calculation down into the actor. The takeway I got from that was that if you find yourself using await you probably need to think again about your design.
-- Alan Burlison -- --
--- 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
