On Thu, 29 Jun 2023 10:08:27 GMT, Sergey Tsypanov <stsypa...@openjdk.org> wrote:

>> Looks ok; was this a tool detected race?
>
> @RogerRiggs no tool, just fell into the sources while debugging my application

@stsypanov I don't see that there's any issue with the existing code as the 
volatile field is only written at most once as guarded by the 
synchronized-block. Best case this patch avoids an extra volatile read 
(presuming it isn't optimized away).

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

PR Comment: https://git.openjdk.org/jdk/pull/14692#issuecomment-1613070489

Reply via email to