On Fri, 21 Jul 2023 14:00:06 GMT, Viktor Klang <[email protected]> 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 896:
>
>> 894: for (DualNode p = (pred == null) ? head : pred.next, c = p;
>> 895: p != null; ) {
>> 896: boolean isData = p.isData;
>
> @DougLea Are you finding that manual hoisting of reads to final members has a
> perf edge? 🤔
Collection-support code from method countOfMode on down was minimally touched
from its previous version. This shows up as a style clash into very branchy
self-link-coping code. Changing might require more changes to WhiteBox tests
that are finicky about node counts and self-links expected in traversals etc.
(These tests are useful but are themselves hard to change to accommodate small
implementation differences.)
> src/java.base/share/classes/java/util/concurrent/LinkedTransferQueue.java
> line 1584:
>
>> 1582: if (isData) {
>> 1583: action.accept((E) item);
>> 1584: pred = p; p = q; continue;
>
> @DougLea These three statements deserve their own lines, I'd say. :)
Same answer as above. Left as they were.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14317#discussion_r1270868924
PR Review Comment: https://git.openjdk.org/jdk/pull/14317#discussion_r1270869931