Skip to content

WI01118904 - Handle disposed AsyncWaitHandle during completion - #42

Merged
jaywang-cn merged 3 commits into
masterfrom
JWA/WI01118904-disposed-async-wait-handle
Sep 1, 2026
Merged

WI01118904 - Handle disposed AsyncWaitHandle during completion#42
jaywang-cn merged 3 commits into
masterfrom
JWA/WI01118904-disposed-async-wait-handle

Conversation

@jaywang-cn

Copy link
Copy Markdown

Summary

  • tolerate ObjectDisposedException when ThreadMethodEntry.Complete signals an AsyncWaitHandle that has already been disposed by its consumer
  • add a regression test verifying the callback runs and the async result reaches completion
  • use the fork-compatible message loop to process the queued callback

Context

Testing

  • dotnet build .\src\test\unit\System.Windows.Forms\System.Windows.Forms.Tests.csproj
  • System.Windows.Forms.Tests.exe --filter-method "System.Windows.Forms.Tests.ControlTests.Control_BeginInvoke_DisposedAsyncWaitHandle_CompletesCallback" --no-progress --output Detailed (1 passed)

@jaywang-cn
jaywang-cn merged commit ee5a4a9 into master Sep 1, 2026
1 check passed
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.

2 participants