AsyncHelpers Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides helpers for awaiting tasks and awaiters in runtime-managed asynchronous methods.
public ref class AsyncHelpers abstract sealed
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static class AsyncHelpers
public static class AsyncHelpers
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5007", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type AsyncHelpers = class
type AsyncHelpers = class
Public Class AsyncHelpers
- Inheritance
-
AsyncHelpers
- Attributes
Remarks
This type supports .NET infrastructure and is not intended to be used directly from your code.
Methods
| Name | Description |
|---|---|
| Await(ConfiguredTaskAwaitable) |
Awaits the specified configured task awaitable and throws any exception produced by the operation. |
| Await(ConfiguredValueTaskAwaitable) |
Awaits the specified configured value task awaitable and throws any exception produced by the operation. |
| Await(Task) |
Awaits the specified Task and throws any exception produced by the operation. |
| Await(ValueTask) |
Awaits the specified ValueTask and throws any exception produced by the operation. |
| Await<T>(ConfiguredTaskAwaitable<T>) |
Awaits the specified configured task awaitable and returns its result, throwing any exception produced by the operation. |
| Await<T>(ConfiguredValueTaskAwaitable<T>) |
Awaits the specified configured value task awaitable and returns its result, throwing any exception produced by the operation. |
| Await<T>(Task<T>) |
Awaits the specified Task<TResult> and returns its result, throwing any exception produced by the task. |
| Await<T>(ValueTask<T>) |
Awaits the specified ValueTask<TResult> and returns its result, throwing any exception produced by the operation. |
| AwaitAwaiter<TAwaiter>(TAwaiter) |
Awaits the specified awaiter and returns when the awaiter has completed. |
| HandleAsyncEntryPoint(Task) |
This method is intended to be used by a compiler-generated async entry point. |
| HandleAsyncEntryPoint(Task<Int32>) |
This method is intended to be used by a compiler-generated async entry point. |
| UnsafeAwaitAwaiter<TAwaiter>(TAwaiter) |
Awaits the specified awaiter using unsafe continuation registration and returns when the awaiter has completed. |