Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add convenience methods directly on IAsyncAction/Operation to facilitate future optimizations and custom Awaiter/Task types. #1580

Merged

Conversation

jlaanstra
Copy link
Collaborator

This PR adds convenience methods for synchronously waiting/getting the result.

Additionally it exposes convenience methods for directly creating a completed/canceled/faulted IAsyncAction/Operation.

The underlying mechanics can be further optimized in future PRs by

  • no longer requiring AsTask() for Wait()/Get()/GetAwaiter().
  • creating more lightweight implementations of IAsyncAction/Operation without the logic related to wrapping Task/Task.

…ate future optimizations and custom Awaiter types.
@jlaanstra jlaanstra changed the title Add convenience methods directly on IAsyncAction/Operation to facilitate future optimizations and custom Awaiter types. Add convenience methods directly on IAsyncAction/Operation to facilitate future optimizations and custom Awaiter/Task types. Apr 21, 2024
@jlaanstra jlaanstra merged commit 5d2de50 into microsoft:staging/AOT Apr 25, 2024
1 check passed
@jlaanstra jlaanstra deleted the user/jlaans/async-convenience branch April 25, 2024 21:40
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