Skip to content

Fix concurrency documentation errors (R080, pass 2) - #1769

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-concurrent-docs-pass-2
Nov 23, 2026
Merged

jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-review-concurrent-docs-pass-2

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

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

Uncertain findings

None.

Checks

  • Parsed all 146 scoped XML files and confirmed no placeholders remain.
  • Confirmed only the intended bytes changed, with CRLF preserved; git diff --check passed.
  • Checked added references: 45 resolve in this repository; three are .NET framework types.
  • Compared linked documentation with Java 21 references and checked nonmatching and unlinked blocks against pinned sources.
  • Ran local OpenJDK demonstrations of successful condition, latch, barrier, and queue operations after their nominal deadlines. Android behavior was verified separately against the sources above and SDK source 37.2 r01, SHA-256 9d637c3af6654a2f1b696b3d19c54bb77e38df2b0106116934703f314b3d4e84.
  • Gemini 4 Argon review: no findings; model verified in local usage events.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 23, 2026 09:35
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 23, 2026 09:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)/awaitUntil return !cancelled, which is settled by the race with doSignal before 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:

  1. LinkedBlockingQueue.Offer(Object,long,TimeUnit) and the synchronous CountDownLatch.Await(long,TimeUnit) still use the old deadline wording even though they have the same race (LBQ 375–378).
  2. 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
jonathanpeppers merged commit da6356f into main Nov 23, 2026
4 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-review-concurrent-docs-pass-2 branch November 23, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants