[concurrency-interest] A puzzle about recursive functions in CompletableFuture

Aaron Grunthal aaron.grunthal at infinite-source.de
Wed Dec 2 07:48:45 EST 2015


That depends how the current-thread-executor is implemented. If the
execute method always executes the submitted tasks down-stack then it'll
lead to a SOE. If it uses an internal queue when it knows that there is
a loop polling tasks from the queue somewhere up-stack then you
effectively have trampolining implemented in the executor.

On 02.12.2015 12:18, Millies, Sebastian wrote:
> if that were all there is to it, should it not work also when using the
> current thread executor? What would then be different about the
> trampolining?



More information about the Concurrency-interest mailing list