On Tue, 31 Jan 2023 10:45:07 GMT, Viktor Klang <d...@openjdk.org> wrote:

> The proposed fix by @DougLea ensures that the state transition into waiting 
> is retried in the cases where a previous waiter isn't making progress and a 
> new waiter goes into waiting.

Hello Viktor, I don't have enough knowledge of this area, but looking at this 
change and going by what Doug noted in the JBS issue:
> There's a CHM bug scenario that I haven't been able to rule out after looking 
> at this again: A late clearing of waiter field in 
> ConcurrentHashMap.contendedLock by a previous waiter. There may be a 
> constraint I've forgotten that makes this impossible in principle, but it is 
> easy to change to be more clearly correct by replacing the writes with CASes

this change looks OK to me.

You might have to add a `noreg-hard` label to that JBS issue.

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

Marked as reviewed by jpai (Reviewer).

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

Reply via email to