Skip to content

Add BarrierPostPhaseException to Barrier XML doc comments - #125635

Merged
danmoseley merged 2 commits into
mainfrom
copilot/fix-barrier-remove-participant-exception
Mar 24, 2026
Merged

danmoseley merged 2 commits into
mainfrom
copilot/fix-barrier-remove-participant-exception

Conversation

Copilot AI commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Description

Barrier.RemoveParticipant(s) calls FinishPhase when removing participants causes all remaining participants to have arrived, which executes the post-phase action and wraps any exception in BarrierPostPhaseException. This exception was undocumented in the XML comments.

Additionally, all six SignalAndWait overloads were missing BarrierPostPhaseException in their XML doc comments despite it being documented in the official API reference.

Changes:

  • Added <exception cref="BarrierPostPhaseException"> to RemoveParticipant and RemoveParticipants
  • Added <exception cref="BarrierPostPhaseException"> to all six SignalAndWait overloads

This is a documentation-only fix — the runtime behavior is by design.

Copilot AI and others added 2 commits March 15, 2026 14:36
@stephentoub
stephentoub marked this pull request as ready for review March 16, 2026 21:10
Copilot AI review requested due to automatic review settings March 16, 2026 21:10
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates System.Threading.Barrier XML documentation to accurately reflect that BarrierPostPhaseException can be thrown from participant-removal APIs and all SignalAndWait overloads when the post-phase action faults.

Changes:

  • Documented BarrierPostPhaseException on RemoveParticipant and RemoveParticipants.
  • Documented BarrierPostPhaseException on all six SignalAndWait overloads.

You can also share your feedback on Copilot code review. Take the survey.

@stephentoub
stephentoub requested a review from danmoseley March 24, 2026 16:16
@danmoseley

Copy link
Copy Markdown
Contributor

/ba-g one dead letter

@danmoseley
danmoseley enabled auto-merge (squash) March 24, 2026 17:30
@danmoseley
danmoseley merged commit 4412aa7 into main Mar 24, 2026
93 of 96 checks passed
@danmoseley
danmoseley deleted the copilot/fix-barrier-remove-participant-exception branch March 24, 2026 17:30
@danmoseley

Copy link
Copy Markdown
Contributor

BTW I assume for this library, repo is source of doc truth so no follow up docs PR needed

@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Barrier.RemoveParticipant can throw undocumented BarrierPostPhaseException

4 participants