RFR 8029164: Race condition in CompletableFuture.thenCompose with asynchronous task
chris.hegarty at oracle.com
Wed Nov 27 11:12:19 UTC 2013
Looks good to me Paul.
On 27/11/13 11:02, Paul Sandoz wrote:
> This fixes an issue with CompletableFuture.thenCompose.
> If the composing future is already completed before the call to thenCompose (or completes during some part of the call to thenCompose) and the composing function returns a future that is not yet completed then there is race to set the result, usually won by thenCompose which incorrectly sets the result to null, due to an errant conditional statement.
> Doug has reviewed and committed the fix to the 166 repo and we have double checked there are no similar errors lurking in other areas of CompletableFuture code.
More information about the core-libs-dev