Skip to content

Improve async execution#139

Merged
jjonescz merged 6 commits intomainfrom
net11p2
Mar 15, 2026
Merged

Improve async execution#139
jjonescz merged 6 commits intomainfrom
net11p2

Conversation

@jjonescz
Copy link
Copy Markdown
Owner

No description provided.

@jjonescz jjonescz requested a review from Copilot March 15, 2026 14:09
@jjonescz jjonescz added the bug Something isn't working label Mar 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves async execution in the Executor by clearing the SynchronizationContext to prevent deadlocks, unwrapping TargetInvocationException to preserve original stack traces, adding IL pattern matching for AsyncHelpers.HandleAsyncEntryPoint, and moving async-related tests to ExecutorTests.cs.

Changes:

  • Clear SynchronizationContext before invoking user code and remove now-unnecessary ConfigureAwait(false) calls
  • Unwrap TargetInvocationException via ExceptionDispatchInfo.Throw to preserve original stack traces, with new exception tests
  • Add IL patterns for AsyncHelpers.HandleAsyncEntryPoint entry points and fix tab click behavior in the Razor UI

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Shared/Executor.cs Core async execution improvements: SynchronizationContext clearing, exception unwrapping, new IL patterns
test/UnitTests/ExecutorTests.cs Added async main and exception tests, moved from CompilerProxyTests
test/UnitTests/CompilerProxyTests.cs Removed async main tests (moved to ExecutorTests)
src/App/Lab/Page.razor Fix tab click to avoid interfering with rename mode; focus editor on tab click
global.json SDK version bump to preview.2
Directory.Packages.props .NET version bump to preview.2

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

@jjonescz jjonescz marked this pull request as ready for review March 15, 2026 14:25
@jjonescz jjonescz merged commit a295ac1 into main Mar 15, 2026
7 checks passed
@jjonescz jjonescz deleted the net11p2 branch March 15, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants