RFR: JDK-8303742: CompletableFuture.orTimeout leaks if the future completes exceptionally [v2]

Viktor Klang duke at openjdk.org
Thu Mar 16 20:56:00 UTC 2023


> 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

Viktor Klang has updated the pull request incrementally with one additional commit since the last revision:

  Update test/jdk/java/util/concurrent/CompletableFuture/CompletableFutureOrTimeoutExceptionallyTest.java
  
  Co-authored-by: Andrey Turbanov <turbanoff at gmail.com>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13059/files
  - new: https://git.openjdk.org/jdk/pull/13059/files/d46a6bed..15e8fcc2

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13059&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13059&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/13059.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/13059/head:pull/13059

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


More information about the core-libs-dev mailing list