You're in luck today—I happen to be a Klang!

What you found is no longer valid and applied to the original Akka Futures.

Thanks for finding this ancient documentation remnant, if you ever see me
at a conference, please let me know and I'll thank you in person. :)



On Thu, Mar 24, 2016 at 3:28 PM, Roland Kuhn <goo...@rkuhn.info> wrote:

> I'm no Klang but I can assure you that all callbacks MUST be dispatched on
> the provided ExecutionContext—otherwise someone will invariably find a way
> to trigger a StackOverflowError. These docs should probably be removed
> completely since we also moved to Scala futures.
>
> Regards,
>
> Roland
>
> Sent from my iPhone
>
> On 24 Mar 2016, at 15:20, Akka Team <akka.offic...@gmail.com> wrote:
>
> I have a feeling that that doc remark is obsolete (these sections were not
> touched in years), but let the expert/Klang speak.
>
> -Endre
>
> On Thu, Mar 24, 2016 at 3:18 PM, Johannes Berg <jberg...@gmail.com> wrote:
>
>> Hi!
>>
>> I've read the documentation at
>> http://doc.akka.io/docs/akka/2.4.2/java/futures.html and where the map
>> function is explained it's stated that "If the Future is already
>> complete though, it will be run in our current thread.". I've just done
>> some tests suggesting this statement would be false, it seems like it's
>> always dispatched on the execution context even though it's already
>> completed.
>>
>> For example this prints two different thread ID:s:
>>
>> System.out.println(Thread.currentThread().getId());
>> Futures.successful(new Object()).map(new Mapper<Object, Object>() {
>>     public Object apply(Object obj) {
>>         System.out.println(Thread.currentThread().getId());
>>     }
>> }, system.dispatcher());
>>
>> Indeed I would prefer that behaviour and would like to trust that fact
>> but then the statement in the docs needs to be changed.
>>
>> Can somebody confirm this, I'm happy to create a bug report in github if
>> you think this indeed is a bug in the documentation.
>>
>> I also found some old stuff about this:
>>
>> https://www.assembla.com/spaces/akka/tickets/1054-complete-futures-asynchronously-when-replying-through-a-channel/details#
>> http://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/
>>
>> Best Regards,
>> Johannes Berg
>>
>> --
>> >>>>>>>>>> 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.
>>
>
>
>
> --
> Akka Team
> Typesafe - Reactive apps on the JVM
> Blog: letitcrash.com
> Twitter: @akkateam
>
> --
> >>>>>>>>>> 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.
>



-- 
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 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