On Thu, 26 Feb 2026 16:15:14 GMT, Chen Liang <[email protected]> wrote:
> I don't think this patch brings much value; the old model was working fine, > and people already identified a few regressions with this supposedly > optimization. Noted. For reference, the motivation here was to make it more obvious to current and future maintainers why this synchronization is correct by making the lock object a constant and the closed state explicit. (I still have work to do to understand why the current model is working fine, other than trusting the lock of reported issues). Optimization was not a goal here at all. > It's not worth reviewers' time to go through "hey there's a specific > undocumented caller constraint to this method that I hope will continue to > work by chance" for a supposedly stylistic improvement. I would not consider synchronizing on non-final fields as merely a "stylistic" issue, But fair enough, I can withdraw this PR :-) ------------- PR Comment: https://git.openjdk.org/jdk/pull/29937#issuecomment-3967732243
