[concurrency-interest] Java 8 CompletableFuture.thenCombine() hangs
viktor.klang at gmail.com
Thu Apr 3 11:00:59 EDT 2014
In Scala, we solve these problems primarily by:
* Always executing callbacks *asynchronously*—i.e. we get a
*trampolining* effect that avoids StackOverflowErrors.
* Always *compressing* intermittent futures, so that *asynchronous tail
calls* (potentially nested "infinite" thenCompose) don't lead to a long
chain of intermittent Futures that have no use (avoiding OutOfMemoryErrors).
: Example: https://gist.github.com/viktorklang/9414163
On Thu, Apr 3, 2014 at 1:08 PM, Doug Lea <dl at cs.oswego.edu> wrote:
> On 04/03/2014 04:28 AM, Paul Sandoz wrote:
> It appears to be caused by a StackOverflowException being thrown when an
>> async task attempts to complete all its dependent tasks in the completion
>> chain. That exception gets swallowed and does not propagate.
> Thanks! I'll look into ways of ensuring that StackOverflowException,
> OutOfMemoryError, and the like at least get reported. These have
> a history of being difficult to deal with, but we can surely do
> Concurrency-interest mailing list
> Concurrency-interest at cs.oswego.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest