Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AwaitUnsafeOnCompleted() [2/2]

void IStateMachineBoxAwareAwaiter. System.Runtime.CompilerServices.ValueTaskAwaiter< TResult >.AwaitUnsafeOnCompleted ( IAsyncStateMachineBox box)
inline

Implements System.Runtime.CompilerServices.IStateMachineBoxAwareAwaiter.

Definition at line 155 of file ValueTaskAwaiter.cs.

156 {
157 object obj = _value._obj;
158 if (obj is Task<TResult> task)
159 {
160 TaskAwaiter.UnsafeOnCompletedInternal(task, box, continueOnCapturedContext: true);
161 }
162 else if (obj != null)
163 {
165 }
166 else
167 {
168 TaskAwaiter.UnsafeOnCompletedInternal(Task.CompletedTask, box, continueOnCapturedContext: true);
169 }
170 }
static Task CompletedTask
Definition Task.cs:1120
static readonly Action< object > s_invokeAsyncStateMachineBox
Definition ThreadPool.cs:18

References System.Threading.Tasks.ValueTask< TResult >._obj, System.Threading.Tasks.ValueTask< TResult >._token, System.Runtime.CompilerServices.ValueTaskAwaiter< TResult >._value, System.Threading.Tasks.Task< TResult >.CompletedTask, System.obj, System.Runtime.CompilerServices.ValueTaskAwaiter< TResult >.OnCompleted(), System.Threading.ThreadPool.s_invokeAsyncStateMachineBox, System.task, and System.Runtime.CompilerServices.TaskAwaiter< TResult >.UnsafeOnCompletedInternal().