RFR: JDK-8302666: Replace CHM with VarHandle in ForeachOrderedTask [v2]

Viktor Klang duke at openjdk.org
Fri Feb 17 11:39:22 UTC 2023


On Thu, 16 Feb 2023 22:01:01 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> @PaulSandoz I'm usually a bit weary of piggybacking if it is not done on the same object, as future reorderings of the code might break that assumption. I wouldn't want to break anything silently so I made a rather conservative change. On which side should I err? :)
>
> Since as you have said the left and right nodes have yet to be "published" (outside of their little nest) I think it should be fine to move it above and next to the constructions.
> (Also since `addToPendingCount` has volatile write semantics, via it's getAndSet, the plain write should not float below that call if that really matters, and its hard to see the code radically changing in this regard unless there is a major rewrite than i guess it all has to be carefully rethought.)

@PaulSandoz Sold! Making the changes :)

@PaulSandoz Done!

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

PR: https://git.openjdk.org/jdk/pull/12320


More information about the core-libs-dev mailing list