Local testing seems to indicate that this fix (which mirrors what's done in the FIFO mode) addresses the problem.
But with that said, I haven't come up with a decent way of adding some form of regression test. Suggestions are most welcome. /cc @DougLea ------------- Commit messages: - Memory leak in unfair mode of SynchronousQueue addressed Changes: https://git.openjdk.org/jdk/pull/19271/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19271&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332154 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/19271.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19271/head:pull/19271 PR: https://git.openjdk.org/jdk/pull/19271