On Thu, 15 Aug 2024 21:05:39 GMT, Viktor Klang <vkl...@openjdk.org> wrote:
>> src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java >> line 290: >> >>> 288: acquire(node, arg, false, false, false, 0L); >>> 289: break; >>> 290: } catch (Error | RuntimeException ex) { >> >> @DougLea @AlanBateman The first question is if this set of exception are the >> way to go, or we should go with Throwable > > One option is to record the first encountered exception instance, which can > then be rethrown once acquire succeeds? Object.wait and Condition.await are unusual in that they must reacquire they continue, even if they throw. So might not be crazy for the cases where it does recover (I assume some cases will never recover and it will retry indefinitely). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20602#discussion_r1723182564