Hi Alan,
the reason is basically that a Future represents some computation that is
“running” (same as a Thread),
so serializing it does not make much sense. (Yes, there’s trickery and
magic we could do, but we avoid such magic tricks).

Rather, use the `future pipeTo someActor` pattern to deal with futures and
actors, as documened here:
https://doc.akka.io/docs/akka/2.5/futures.html#use-with-actors

Happy hakking

-- 
Cheers,
Konrad 'ktoso <http://kto.so>' Malawski
Akka <http://akka.io/> @ Lightbend <http://lightbend.com/>

On February 21, 2018 at 9:34:27, Alan Burlison (alan.burli...@gmail.com)
wrote:

I was browsing through "Effective Akka" and I noticed the following
somewhat cryptic warning:

----------
Warning
Futures should never be passed between actors because you cannot
serialize a thread.
----------

along with a bit above it about why Actor-to-Actor completion can't be
signalled using a Promise/Future:

"You cannot return a future value from a promise - they cannot be sent
to an actor, which may or may not be remote."

Why? Is this an implementation detail perhaps?

Thanks,

-- 
Alan Burlison
-- 

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

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

Reply via email to