[concurrency-interest] CompletableFuture.whenComplete survey

Doug Lea dl at cs.oswego.edu
Mon Dec 21 09:22:27 EST 2015


On 12/21/2015 09:01 AM, joe.bowbeer at gmail.com wrote:
> Given this discussion, I had assumed that the jdk8 documentation left the door
> open regarding what happened if the whenComplete action itself threw an
> exception,

Given the controversy, the survey includes all known options,
including those that would require an interface-level spec change.
Only the first two options are clearly compatible with current spec.

> I agree that better documentation about the intended use is needed.

Suggestions are always welcome! People out there do complain
a lot about the terse javadocs. We initially decided against
tutorial-style documentation, thinking that the topic was too
big to fit into javadocs. But a few additional explanations
and examples would still help.

A few tutorials have arisen elsewhere, including in some java8 books and:

http://www.jesperdj.com/2015/09/26/the-future-is-completable-in-java-8/
http://www.infoq.com/articles/Functional-Style-Callbacks-Using-CompletableFuture
http://www.nurkiewicz.com/2013/05/java-8-definitive-guide-to.html

and probably more.

-Doug




More information about the Concurrency-interest mailing list