RFR: 8301341: LinkedTransferQueue does not respect timeout for poll() [v9]

Doug Lea dl at openjdk.org
Fri Jul 21 16:16:46 UTC 2023


On Fri, 21 Jul 2023 13:53:57 GMT, Viktor Klang <duke at openjdk.org> wrote:

>> Doug Lea has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Address review comments
>
> src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java line 639:
> 
>> 637:             else {
>> 638:                 if (p != h && cmpExHead(h, p) == h)
>> 639:                     h.next = h; // h.selfLink();
> 
> @DougLea Too expensive with the call? 🤔

Not really; just a undeleted remnant of a previous factoring. Fixed.

> src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java line 667:
> 
>> 665:         else if (cmpExHead(c, p) != c)
>> 666:             return false;
>> 667:         if (c != null)
> 
> @DougLea If this `if` is not related to the above if-tree, I'd put a newline between them. (Also makes sense to add a newline before the last `return` as well (to indicate that it is standalone from the if)

Thanks. Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14317#discussion_r1270855580
PR Review Comment: https://git.openjdk.org/jdk/pull/14317#discussion_r1270855756


More information about the core-libs-dev mailing list