AwaitExtensions.GetAwaiter Method
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.
Overloads
GetAwaiter(TaskScheduler) |
Gets an awaiter that schedules continuations on the specified scheduler. |
GetAwaiter(WaitHandle) |
Provides await functionality for ordinary WaitHandles. |
GetAwaiter(TaskScheduler)
Gets an awaiter that schedules continuations on the specified scheduler.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::VisualStudio::Threading::AwaitExtensions::TaskSchedulerAwaiter GetAwaiter(System::Threading::Tasks::TaskScheduler ^ scheduler);
public static Microsoft.VisualStudio.Threading.AwaitExtensions.TaskSchedulerAwaiter GetAwaiter(this System.Threading.Tasks.TaskScheduler scheduler);
static member GetAwaiter : System.Threading.Tasks.TaskScheduler -> Microsoft.VisualStudio.Threading.AwaitExtensions.TaskSchedulerAwaiter
<Extension()>
Public Function GetAwaiter (scheduler As TaskScheduler) As AwaitExtensions.TaskSchedulerAwaiter
Parameters
- scheduler
- TaskScheduler
The task scheduler used to execute continuations.
Returns
An awaitable.
Applies to
GetAwaiter(WaitHandle)
Provides await functionality for ordinary WaitHandles.
public:
[System::Runtime::CompilerServices::Extension]
static System::Runtime::CompilerServices::TaskAwaiter GetAwaiter(System::Threading::WaitHandle ^ handle);
public static System.Runtime.CompilerServices.TaskAwaiter GetAwaiter(this System.Threading.WaitHandle handle);
static member GetAwaiter : System.Threading.WaitHandle -> System.Runtime.CompilerServices.TaskAwaiter
<Extension()>
Public Function GetAwaiter (handle As WaitHandle) As TaskAwaiter
Parameters
- handle
- WaitHandle
The handle to wait on.
Returns
The awaiter.