-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8359919: Minor java.util.concurrent doc improvements #25880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
/issue JDK-8187775 |
/issue JDK-8254060 |
👋 Welcome back dl! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
/issue JDK-8210149 |
/issue JDK-8199501 |
@DougLea |
/issue JDK-8233050 |
@DougLea |
/issue JDK-8210312 |
/issue JDK-8292365 |
@DougLea |
/issue JDK-8356304 |
@DougLea |
@DougLea |
@DougLea |
@DougLea |
@DougLea |
Webrevs
|
I think the problem in |
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java
Outdated
Show resolved
Hide resolved
/issue JDK-8333172 |
@DougLea |
* return LEFT.compareAndSet(this, expect, update); | ||
* } | ||
* // ... and so on | ||
* }}</pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be convert to a {@snippet ..}
and have it handle the checked exceptions thrown by findVarHandle. I'm just thinking of someone seeing VarHandle usage for first time, then reporting a bug that the example doesn't compile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made it compilable, in the lest ugly way I could think of. Not sure if either or both should now be snippets? @pavelrappo any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Up to you. Currently, in addition to what <pre>{@code ...}</pre>
does, a snippet provides a copy-paste facility. Other than that, there isn't much it would buy you here.
In JDK 25 even pre-code is highlighted 1: https://cr.openjdk.org/~hannesw/8348282/api.00/java.base/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.html
Footnotes
src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java
Outdated
Show resolved
Hide resolved
* behave in accord with other {@link ExecutorService} tasks, except | ||
* that {@code scheduleAtFixedRate} and {@code scheduleWithFixedDelay} | ||
* methods create and execute tasks that run periodically until | ||
* cancelled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this wording, and use of "enabled", is good.
In passing, the first paragraph schedule "tasks" but returns "a task object". It might be saying that it returns task objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java
Outdated
Show resolved
Hide resolved
/issue JDK-6374942 |
@DougLea |
/issue JDK-7176957 |
@DougLea |
* forcibly completing normally or exceptionally, probing completion | ||
* status or results, or awaiting completion of a stage. | ||
* Implementations of CompletionStage may provide means of achieving | ||
* such effects, as appropriate. Method {@link #toCompletableFuture} | ||
* enables interoperability among different implementations of this | ||
* interface by providing a common conversion type. | ||
* | ||
* <p>Memory consistency effects: Actions in a thread prior to the | ||
* submission of a computation producing a {@code CompletionStage} | ||
* <i>happen-before</i> that computation begins. And actions taken by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that it's the only occurrence of happen(s)-before in this file, it makes sense to link it to its definition similarly to how it is done in other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, done.
/issue JDK-8172177 |
@DougLea |
/issue JDK-6714849 |
@DougLea |
/issue JDK-6625724 |
@DougLea |
/issue JDK-6526284 |
@DougLea |
Do we need a CSR to check some of these specification updates? |
There is at least one new testable assertion in TimeUnit.timedWait that will need a CSR. I'll look out for others. |
I did a pass over the latest changes (9d9239c) and all looks good. There are several classes where the advice for developers could move to an apiNote in the class (or method) description but it would be disruptive given that it's inline with the existing text. The only change that I think we will need a CSR is the update to TimeUnit as exception is a new testable assertion. |
This collects miscellaneous open issues that can be resolved with documentation updates; each indicated by adding JDK issue numbers
Progress
Issues
whenComplete
andthenApply
change exceptional result (Bug - P4)Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25880/head:pull/25880
$ git checkout pull/25880
Update a local copy of the PR:
$ git checkout pull/25880
$ git pull https://git.openjdk.org/jdk.git pull/25880/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25880
View PR using the GUI difftool:
$ git pr show -t 25880
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25880.diff
Using Webrev
Link to Webrev Comment