Skip to content

fix: DisposeComponentsAsync disposes components while the dispatcher … - #1940

Merged
linkdotnet merged 1 commit into
mainfrom
fix/1939
Oct 16, 2026
Merged

linkdotnet merged 1 commit into
mainfrom
fix/1939

Conversation

@linkdotnet

Copy link
Copy Markdown
Collaborator

Closes #1939

Copilot AI balanced review requested due to automatic review settings October 16, 2026 07:45

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

The focused fix addresses the reported race with regression coverage and no identified blocking issues; tests were not run.

0 open findings

What changed in this PR

Fixes #1939 so bUnit disposes rendered components even when the renderer’s dispatcher is busy.

Changes:

  • Moves root-component snapshotting and clearing onto the dispatcher and revises disposal-task tracking.
  • Adds a regression test that holds the dispatcher busy during disposal.
  • Documents the fix in the changelog.
File Description
tests/​bunit.tests/​BunitContextTest.cs Adds busy-dispatcher disposal coverage.
src/​bunit/​Rendering/​BunitRenderer.cs Fixes disposal ordering and task tracking.
CHANGELOG.md Records the fix for #1939.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@linkdotnet
linkdotnet force-pushed the fix/1939 branch 2 times, most recently from e05a98d to d8e4d84 Compare October 16, 2026 08:21
@linkdotnet
linkdotnet merged commit 945163b into main Oct 16, 2026
10 checks passed
@linkdotnet
linkdotnet deleted the fix/1939 branch October 16, 2026 10:32
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.

DisposeComponentsAsync() can dispose nothing while a timer is rendering

2 participants