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

◆ RunInternal()

static void System.Threading.ExecutionContext.RunInternal ( ExecutionContext executionContext,
ContextCallback callback,
object state )
inlinestaticpackage

Definition at line 116 of file ExecutionContext.cs.

117 {
118 Thread currentThread = Thread.CurrentThread;
119 ExecutionContext executionContext2 = currentThread._executionContext;
120 if (executionContext2 != null && executionContext2.m_isDefault)
121 {
122 executionContext2 = null;
123 }
125 SynchronizationContext synchronizationContext = currentThread._synchronizationContext;
126 if (executionContext != null && executionContext.m_isDefault)
127 {
128 executionContext = null;
129 }
131 {
133 }
135 try
136 {
137 callback(state);
138 }
139 catch (Exception source)
140 {
142 }
143 if (currentThread._synchronizationContext != synchronizationContext)
144 {
146 }
147 ExecutionContext executionContext4 = currentThread._executionContext;
149 {
151 }
152 exceptionDispatchInfo?.Throw();
153 }
static ExceptionDispatchInfo Capture(Exception source)
static void RestoreChangedContextToThread(Thread currentThread, ExecutionContext contextToRestore, ExecutionContext currentContext)

References System.Threading.Thread._executionContext, System.Threading.Thread._synchronizationContext, System.Runtime.ExceptionServices.ExceptionDispatchInfo.Capture(), System.Threading.Thread.CurrentThread, System.Runtime.Serialization.Dictionary, System.Threading.ExecutionContext.RestoreChangedContextToThread(), System.source, and System.state.

Referenced by System.Threading.TimerQueueTimer.CallCallback(), System.Threading.CancellationTokenSource.CallbackNode.ExecuteCallback(), System.Threading.Tasks.Task< TResult >.ExecuteWithThreadLocal(), System.IO.Stream.ReadWriteTask.Invoke(), System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder< TResult >.StateMachineBox< TStateMachine >.MoveNext(), System.Runtime.CompilerServices.AsyncTaskMethodBuilder< TResult >.AsyncStateMachineBox< TStateMachine >.MoveNext(), System.Threading._IOCompletionCallback.PerformIOCompletionCallback(), System.Threading.Thread.StartHelper.Run(), System.Threading.ExecutionContext.Run(), and System.Threading.Tasks.AwaitTaskContinuation.RunCallback().