RFR: 8332084: Ensure JdkConsoleImpl.restoreEcho visibility in a shutdown hook [v4]
Naoto Sato
naoto at openjdk.org
Tue May 14 13:35:02 UTC 2024
On Mon, 13 May 2024 21:32:18 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> Making sure `restoreEcho` correctly reflects the state in the shutdown thread, which differs from the application's thread that issues the `readPassword()` method.
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>
> Addresses a review comment
I thought of the same scenario that is certainly possible. Now I am tempted to avoid this race condition altogether by removing checking restoreEcho and always issue echo(true). What do you guys think?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/19184#issuecomment-2110258850
More information about the core-libs-dev
mailing list