Integrated: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally

Viktor Klang duke at openjdk.org
Mon Mar 20 13:59:53 UTC 2023


On Thu, 16 Mar 2023 13:37:10 GMT, Viktor Klang <duke at openjdk.org> wrote:

> Addresses the situation where exceptional completion of `orTimeout`:ed CompletableFutures wouldn't cancel the timeout task which could lead to memory leaks if done frequently enough with long enough timeout durations.
> 
> Fix discussed with @DougLea

This pull request has now been integrated.

Changeset: ded6a813
Author:    Viktor Klang <viktor.klang at oracle.com>
Committer: Jaikiran Pai <jpai at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ded6a8131970ac2f7ae59716769e6f6bae3b809a
Stats:     64 lines in 2 files changed: 63 ins; 0 del; 1 mod

8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally

Reviewed-by: jpai, alanb

-------------

PR: https://git.openjdk.org/jdk/pull/13059


More information about the core-libs-dev mailing list