RFR: 8340830: Console.readLine() and Console.printf() are mutually blocking

Naoto Sato naoto at openjdk.org
Thu Jan 29 21:14:37 UTC 2026


Fixing an issue in Console where write is blocked if other thread is waiting to read, which is caused by unnecessary read/write locks. Removing those would solve the problem, as the read/write synchronization is performed at the StreamEn/Decoder level. One unrelated change is to refactor double-checked locking with LazyConstant.

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

Commit messages:
 - initial commit

Changes: https://git.openjdk.org/jdk/pull/29493/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29493&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8340830
  Stats: 284 lines in 4 files changed: 150 ins; 93 del; 41 mod
  Patch: https://git.openjdk.org/jdk/pull/29493.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29493/head:pull/29493

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


More information about the core-libs-dev mailing list