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

◆ TryRunInline()

bool System.Threading.Tasks.TaskScheduler.TryRunInline ( Task task,
bool taskWasPreviouslyQueued )
inlinepackageinherited

Definition at line 114 of file TaskScheduler.cs.

115 {
116 TaskScheduler executingTaskScheduler = task.ExecutingTaskScheduler;
117 if (executingTaskScheduler != this && executingTaskScheduler != null)
118 {
120 }
121 if (executingTaskScheduler == null || (object)task.m_action == null || task.IsDelegateInvoked || task.IsCanceled || !RuntimeHelpers.TryEnsureSufficientExecutionStack())
122 {
123 return false;
124 }
125 if (TplEventSource.Log.IsEnabled())
126 {
127 task.FireTaskScheduledIfNeeded(this);
128 }
130 if (flag && !task.IsDelegateInvoked && !task.IsCanceled)
131 {
132 throw new InvalidOperationException(SR.TaskScheduler_InconsistentStateAfterTryExecuteTaskInline);
133 }
134 return flag;
135 }
bool TryExecuteTaskInline(Task task, bool taskWasPreviouslyQueued)

References System.Threading.Tasks.TplEventSource.Log, System.task, System.SR.TaskScheduler_InconsistentStateAfterTryExecuteTaskInline, System.Runtime.CompilerServices.RuntimeHelpers.TryEnsureSufficientExecutionStack(), and System.Threading.Tasks.TaskScheduler.TryExecuteTaskInline().

Referenced by System.Threading.Tasks.Task< TResult >.WrappedTryRunInline().