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

◆ AwaitUnsafeOnCompleted() [2/2]

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

Implements System.Runtime.CompilerServices.IStateMachineBoxAwareAwaiter.

Definition at line 167 of file ConfiguredValueTaskAwaitable.cs.

168 {
169 object obj = _value._obj;
170 if (obj is Task<TResult> task)
171 {
172 TaskAwaiter.UnsafeOnCompletedInternal(task, box, _value._continueOnCapturedContext);
173 }
174 else if (obj != null)
175 {
177 }
178 else
179 {
180 TaskAwaiter.UnsafeOnCompletedInternal(Task.CompletedTask, box, _value._continueOnCapturedContext);
181 }
182 }
static Task CompletedTask
Definition Task.cs:1120
static readonly Action< object > s_invokeAsyncStateMachineBox
Definition ThreadPool.cs:18
readonly bool _continueOnCapturedContext
Definition ValueTask.cs:69

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