On Mon, 12 Aug 2024 23:39:02 GMT, David Holmes <dhol...@openjdk.org> wrote:

> It has been a while since I knew this code reasonably well so perhaps I have 
> just forgotten this difference between AQS and built-in monitors, but it 
> seems that a Condition.await can return by throwing an exception without 
> re-acquiring the associated synchronizer. Or is that handled at a 
> higher-level?

The semantics are the same as monitor wait/notify so Condition.await must 
guarantee to hold the lock when it returns. If ConditionNode.block were to 
throw something like StackOverflowError then there would be an issue (it's a 
different park to the one changed in this PR but I think you do have a good 
point).

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

PR Comment: https://git.openjdk.org/jdk/pull/20548#issuecomment-2285609879

Reply via email to