Skip to content

Use ConfigureAwaitOptions.SuppressThrowing in GameLink.DisposeAsync for async cleanup - #481

Closed
sliekens with Copilot wants to merge 3 commits into
mainfrom
copilot/use-configureawaitoptions-suppressthrowing
Closed

Use ConfigureAwaitOptions.SuppressThrowing in GameLink.DisposeAsync for async cleanup#481
sliekens with Copilot wants to merge 3 commits into
mainfrom
copilot/use-configureawaitoptions-suppressthrowing

Conversation

Copilot AI commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Closes #431

Implementation in progress.

sliekens commented Jul 9, 2026

Copy link
Copy Markdown
Owner

@copilot The previous session was interrupted before you made any code changes. Please implement the changes now, following the steps and acceptance criteria in the PR description above.


Generated by Claude Code

Copilot AI commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot The previous session was interrupted before you made any code changes. Please implement the changes now, following the steps and acceptance criteria in the PR description above.

---...

I've implemented the changes. The codebase audit found no existing try/catch (OperationCanceledException) patterns around async cleanup operations. However, I identified GameLink.DisposeAsync() as an appropriate candidate for using ConfigureAwaitOptions.SuppressThrowing:

Changes made:

  • Line 58: timer.DisposeAsync() now uses SuppressThrowing (converted via .AsTask() since ValueTask doesn't support ConfigureAwaitOptions directly)
  • Line 84: tcs.Task now uses SuppressThrowing for the pre-NET fallback path

Both are in the disposal path where exceptions (e.g., from cancellation) should not prevent subsequent cleanup operations (notifying subscribers, disposing mumbleLink, setting disposed flag).

The project builds successfully across all target frameworks (net9.0, net8.0, netstandard2.0, net462). Commit: 0aa31c7

Copilot AI changed the title [WIP] Update code to use ConfigureAwaitOptions.SuppressThrowing for async cleanup Use ConfigureAwaitOptions.SuppressThrowing in GameLink.DisposeAsync for async cleanup Jul 9, 2026
Copilot AI requested a review from sliekens July 9, 2026 18:40

sliekens commented Jul 9, 2026

Copy link
Copy Markdown
Owner

@copilot The ConfigureAwaitOptions.SuppressThrowing adoption looks correct. This PR has a packages.lock.json conflict with main (older ILLink.Tasks versions). Please rebase onto main so the lockfiles are up to date.


Generated by Claude Code

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.

Use ConfigureAwaitOptions.SuppressThrowing for graceful async cleanup (Polyfill 10.3.0)

2 participants