Skip to content

8354060: LinkedBlockingDeque.clear() should preserve weakly-consistent iterators - #24488

Closed
kabutz wants to merge 1 commit into
openjdk:masterfrom
kabutz:juc-lbd-selflink
Closed

8354060: LinkedBlockingDeque.clear() should preserve weakly-consistent iterators#24488
kabutz wants to merge 1 commit into
openjdk:masterfrom
kabutz:juc-lbd-selflink

Conversation

@kabutz

@kabutz kabutz commented Apr 7, 2025

Copy link
Copy Markdown
Contributor

LinkedBlockingDeque.clear() should preserve weakly-consistent iterators by linking f.prev and f.next back to f, allowing the iterators to continue from the first or last respectively. This would be consistent with how the other node-based weakly consistent queues LinkedBlockingQueue LinkedTransferQueue, ConcurrentLinkedQueue/Deque work.

The LBD already supports self-linking, since that is done by the unlinkFirst() and unlinkLast() methods, and the iterators and spliterator all support this.

This can be fixed very easily by linking both f.prev and f.next back to f.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8354060: LinkedBlockingDeque.clear() should preserve weakly-consistent iterators (Bug - P4) ⚠️ Issue is not open.

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24488/head:pull/24488
$ git checkout pull/24488

Update a local copy of the PR:
$ git checkout pull/24488
$ git pull https://git.openjdk.org/jdk.git pull/24488/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24488

View PR using the GUI difftool:
$ git pr show -t 24488

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24488.diff

Using Webrev

Link to Webrev Comment

…eration consistent with other linked data structures.
@bridgekeeper

bridgekeeper Bot commented Apr 7, 2025

Copy link
Copy Markdown

👋 Welcome back kabutz! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk

openjdk Bot commented Apr 7, 2025

Copy link
Copy Markdown

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk

openjdk Bot commented Apr 7, 2025

Copy link
Copy Markdown

@kabutz The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk Bot added the core-libs core-libs-dev@openjdk.org label Apr 7, 2025
@kabutz kabutz changed the title LinkedBlockingDeque.clear() should preserve weakly-consistent iterators 8354060: LinkedBlockingDeque.clear() should preserve weakly-consistent iterators Apr 8, 2025
@openjdk openjdk Bot added the rfr Pull request is ready for review label Apr 8, 2025
@mlbridge

mlbridge Bot commented Apr 8, 2025

Copy link
Copy Markdown

Webrevs

@bridgekeeper

bridgekeeper Bot commented May 5, 2025

Copy link
Copy Markdown

@kabutz This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@kabutz

kabutz commented May 13, 2025

Copy link
Copy Markdown
Contributor Author

These changes have been included in #24925

@kabutz kabutz closed this May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant