RFR: 8352971: Increase maximum number of hold counts for ReentrantReadWriteLock [v2]
Viktor Klang
vklang at openjdk.org
Tue Apr 8 13:51:24 UTC 2025
On Tue, 8 Apr 2025 05:12:00 GMT, Jean-Noël Rouvignac <duke at openjdk.org> wrote:
>> Viktor Klang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision:
>>
>> - Make sure that the test fails in case of an InterruptedException
>> - Adding support for more than 65k readers and writers of ReentrantReadWriteLock
>
> src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java line 1:
>
>> 1: /*
>
> @viktorklang-ora thank you so much for pushing this through!
>
> There's a small nit: a co-worker noticed that this part of the javadoc is no longer true:
>
> * <h2>Implementation Notes</h2>
> *
> * <p>This lock supports a maximum of 65535 recursive write locks
> * and 65535 read locks. Attempts to exceed these limits result in
> * {@link Error} throws from locking methods.
>
>
> Thanks again!
@JnRouvignac Thanks for catching this, I've opened the following PR to amend this: https://github.com/openjdk/jdk/pull/24502/files
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24261#discussion_r2033236368
More information about the core-libs-dev
mailing list