On Tue, 14 May 2024 13:32:39 GMT, Naoto Sato <na...@openjdk.org> wrote:

> 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?

It should be possible to provide something adequate based on atomic primitives. 
However, it would complicate code. So, let's first clarify the problem that 
`restoreEcho` is trying to solve: why is it important to restore the echo state 
upon JVM exit? What would happen if we fail to do that? Can it be demonstrated?

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

PR Comment: https://git.openjdk.org/jdk/pull/19184#issuecomment-2110336034

Reply via email to