RFR: 8279294: NonblockingQueue::try_pop may improperly indicate queue is empty

Ivan Walulya iwalulya at openjdk.java.net
Thu Jan 20 20:52:52 UTC 2022


On Wed, 19 Jan 2022 22:43:25 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this improvement to NonblockingQueue::try_pop.  The old code
> returned an indication that the queue was empty in some cases where that
> wasn't true.  In particular, contending try_pop operations could result in
> some incorrectly indicating empty.  The change fixes that and improves the
> interaction between contending try_pops.
> 
> Testing:
> mach5 tier1-3
> 
> Lots of testing of this change in conjunction with others as part of
> investigating and fixing JDK-8273383.

Lgtm!

Suggestion:
With the comments growing after each change, maybe we rename `result` to `old_head`

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

Marked as reviewed by iwalulya (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7149


More information about the hotspot-dev mailing list