API reference
API reference
Select your platform
No SDKs available
No versions available

Awaiter Struct

Definition of an awaiter that satisfies the await contract.
OVRTask::Awaiter extends INotifyCompletion.

Overview

Properties

bool
Whether the task has completed.

Public Member Functions

void INotifyCompletion.
OnCompleted
( Action continuation )
Provides the Awaiter with a method to call when the task completes.
TResult
Gets the result of the asynchronous operation.

Details

Detailed Description

This allows an OVRTask<T> to be awaited using the await keyword. Typically, you should not use this struct; instead, it is used by the compiler by automatically calling the GetAwaiter method when using the await keyword.

Properties

bool OVRTask< TResult >.Awaiter.IsCompleted
Whether the task has completed.
When True the asynchronous operation associated with the OVRTask<TResult> that created this Awaiter (see OVRTask<TResult>.GetAwaiter) is complete.
Typically, you would not call this directly. This is queried by a compiler-generated state machine to support async / await.

Member Functions

void INotifyCompletion. OVRTask< TResult >.Awaiter.OnCompleted
( Action continuation )
Provides the Awaiter with a method to call when the task completes.
Do not call this directly. It is called by a compiler-generated state machine when using the await keyword.
Parameters
continuation
The continuation to invoke when the task is complete.
TResult OVRTask< TResult >.Awaiter.GetResult ( )
Gets the result of the asynchronous operation.
Typically, you should not call this directly. Use OVRTask<TResult>.GetResult() instead.
Returns
The result of the asynchronous operation.
Exceptions
InvalidOperationException
Thrown if there is no result available.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon