Repository navigation
Fix concurrency documentation errors (R080, pass 2) - #1769
Merged
jonathanpeppers merged 1 commit intoNov 23, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the documentation-only concurrency API clarifications.
No open issues 🎉
What changed in this PR
This documentation-only PR refines the .NET Android concurrency API reference, correcting timeout descriptions that implied successful operations must complete before their nominal deadlines.
Changes:
- Clarifies condition-wait results and lock reacquisition timing.
- Corrects timed latch, barrier, queue, and completion-service outcomes.
- Describes the default fork-join worker-thread factory as a factory rather than a newly created thread.
| File | Description |
|---|---|
| docs/xml/Java.Util.Concurrent/PriorityBlockingQueue.xml | Clarifies timed polling results. |
| docs/xml/Java.Util.Concurrent/LinkedTransferQueue.xml | Clarifies timed polling and transfer outcomes. |
| docs/xml/Java.Util.Concurrent/LinkedBlockingQueue.xml | Corrects timed polling return wording. |
| docs/xml/Java.Util.Concurrent/LinkedBlockingDeque.xml | Clarifies timed insertion and removal outcomes. |
| docs/xml/Java.Util.Concurrent/ForkJoinPool.xml | Corrects the default worker-thread factory description. |
| docs/xml/Java.Util.Concurrent/ExecutorCompletionService.xml | Clarifies timed completion polling results. |
| docs/xml/Java.Util.Concurrent/CyclicBarrier.xml | Corrects asynchronous timeout and barrier-state wording. |
| docs/xml/Java.Util.Concurrent/CountDownLatch.xml | Describes asynchronous results using the observed latch count. |
| docs/xml/Java.Util.Concurrent/ArrayBlockingQueue.xml | Clarifies timed insertion and polling results. |
| docs/xml/Java.Util.Concurrent.Locks/AbstractQueuedSynchronizer+ConditionObject.xml | Distinguishes condition timeout from lock reacquisition timing. |
| docs/xml/Java.Util.Concurrent.Locks/AbstractQueuedLongSynchronizer+ConditionObject.xml | Applies the same condition-wait timing clarification. |
Review effort: Balanced
Member
Author
|
@dalexsoto review |
dalexsoto
approved these changes
Nov 23, 2026
dalexsoto
left a comment
Member
There was a problem hiding this comment.
Checked all 19 edited blocks against android-16.0.0_r1 libcore (ojluni/.../java/util/concurrent); the new wording matches the implementation.
- ConditionObject
await(long, TimeUnit)/awaitUntilreturn!cancelled, which is settled by the race withdoSignalbefore the lock is reacquired (AQS 1786–1857, AQLS 1409–1480). - The timed queue and completion-service methods recheck state before acting on a timeout (ABQ 393–396/432–435, LBD 399–538, LBQ 455–460, PBQ 545–556, LTQ 446).
- CountDownLatch tries the acquire before the deadline break (AQS 707 vs 755–758); CyclicBarrier checks the generation before timing out (254–259).
- ForkJoinPool matches 988–996/2573–2595.
The XML parses, the crefs resolve, and there are no conflicts with main.
Non-blocking follow-ups:
LinkedBlockingQueue.Offer(Object,long,TimeUnit)and the synchronousCountDownLatch.Await(long,TimeUnit)still use the old deadline wording even though they have the same race (LBQ 375–378).- In
CyclicBarrier.AwaitAsync, a broken barrier takes precedence over a timeout (251 runs before 257), so "times out before the barrier is tripped or broken" would be more precise.
jonathanpeppers
deleted the
jonathanpeppers-review-concurrent-docs-pass-2
branch
November 23, 2026 10:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope
Second-pass review of item R080: Java.Util.Concurrent, Java.Util.Concurrent.Atomic, Java.Util.Concurrent.Locks, and Java.Util.Functions. Reviewed 402 substantive changed documentation blocks across 146 files; skipped 18 formatting-only blocks.
Fixes
CountDownLatch.AwaitAsyncandCyclicBarrier.AwaitAsyncoutcomes: a delayed waiter can observe a zero count or a tripped barrier after the nominal timeout. See CountDownLatch, the shared acquisition loop, and CyclicBarrier.ForkJoinPool.DefaultForkJoinWorkerThreadFactoryas a factory rather than a newly created thread. See ForkJoinPool.Uncertain findings
None.
Checks
git diff --checkpassed.9d637c3af6654a2f1b696b3d19c54bb77e38df2b0106116934703f314b3d4e84.