RFR: 8355726: LinkedBlockingDeque fixes and improvements [v6]

kabutz duke at openjdk.org
Tue Jun 10 16:03:48 UTC 2025


On Tue, 10 Jun 2025 10:13:20 GMT, Viktor Klang <vklang at openjdk.org> wrote:

>> kabutz has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Whitespace
>
> src/java.base/share/classes/java/util/concurrent/LinkedBlockingDeque.java line 225:
> 
>> 223:         ++count;
>> 224:         notEmpty.signal();
>> 225:         return true;
> 
> Suggestion:
> 
>         count = c + 1;
>         notEmpty.signal();
>         return true;

Good idea

> test/jdk/java/util/concurrent/tck/LinkedBlockingDequeTest.java line 1967:
> 
>> 1965: 
>> 1966:     public void testWeaklyConsistentIterationWithIteratorRemove() {
>> 1967:         final LinkedBlockingDeque<Item> q = new LinkedBlockingDeque<>(15);
> 
> @kabutz Would 5 suffice?

I've removed the sizes - they served no purpose.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24925#discussion_r2138276297
PR Review Comment: https://git.openjdk.org/jdk/pull/24925#discussion_r2138279198


More information about the core-libs-dev mailing list