Skip to content

Conversation

@jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Dec 8, 2025

Removes some abstraction and unifies behavior with async 1 at the cost of these rarely created tasks being slightly larger for void methods.

Fix #122235

Removes some abstraction and unifies behavior with async 1, at the cost
of slightly larger instances for void methods.
Copilot AI review requested due to automatic review settings December 8, 2025 11:59
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 8, 2025
Copy link
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 simplifies the runtime async implementation by removing an abstraction layer and unifying the handling of void-returning async methods with other async methods. The change uses VoidTaskResult as a concrete type parameter instead of maintaining a separate non-generic task implementation.

Key Changes:

  • Removed the IRuntimeAsyncTaskOps<T> interface and its implementations, eliminating unnecessary abstraction
  • Consolidated RuntimeAsyncTask (non-generic) and RuntimeAsyncTask<T> into a single generic class by using VoidTaskResult for void methods
  • Converted static generic operations to instance methods for simpler and more direct code

@am11 am11 added area-Interop-coreclr runtime-async area-System.Threading.Tasks and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners area-Interop-coreclr labels Dec 8, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-threading-tasks
See info in area-owners.md if you want to be subscribed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiler-Async and Runtime-Async difference for async Task methods

2 participants