On Tue, 13 Aug 2024 22:03:54 GMT, David Holmes <dhol...@openjdk.org> wrote:

> AFAICS `await` would call the acquire method that was changed here. I know we 
> have issues with OOME and SOE, but these changes admit more general exception 
> possibilities that would seem to undermine the required guarantee. But 
> perhaps a different `acquire` is involved in the `await` case?

The changes here just cancel the attempt to acquire before throwing. There is 
more to Condition.awaitXXX in that they park until they can acquire, then 
acquire. So SOE or some other resource error would mean awaitXXX throws without 
holding the lock. We have done some work to on the virtual thread 
implementation of LockSupport.park/parkNanos/unpark so they never fail with 
OOME. There is a bit more to come there but otherwise not clear how to deal 
with other resource errors.

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

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

Reply via email to