[concurrency-interest] CompletableFuture: Which thread runs the thenApply-Function?

Martin Buchholz martinrb at google.com
Fri Jul 24 12:44:51 EDT 2015


On Fri, Jul 24, 2015 at 8:32 AM, Jörg Hettel <joerg.hettel at hs-kl.de> wrote:

>
>
> This raises the following question for me:
>
> 1. It would therefore be a good idea always to use the then<XXXX>Async
> method, right?
> 2. What was the intent to include in each case async and non-async
> versions of the methods in the API?
> 3. In which cases can I safely use non-async methods to build asynchronous
> sequences?
>

I think the same question applies to any chunk of code anywhere - do you
want to run it async?  The answer is more often "no" than "yes", since
async execution is not free.  Just like in real life!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20150724/dc9bccc2/attachment.html>


More information about the Concurrency-interest mailing list