Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
TaskContinuation.cs
Go to the documentation of this file.
2
3internal abstract class TaskContinuation
4{
5 internal abstract void Run(Task completedTask, bool canInlineContinuationTask);
6
7 protected static void InlineIfPossibleOrElseQueue(Task task, bool needsProtection)
8 {
9 if (needsProtection)
10 {
11 if (!task.MarkStarted())
12 {
13 return;
14 }
15 }
16 else
17 {
18 task.m_stateFlags |= 65536;
19 }
20 try
21 {
22 if (!task.m_taskScheduler.TryRunInline(task, taskWasPreviouslyQueued: false))
23 {
24 task.m_taskScheduler.InternalQueueTask(task);
25 }
26 }
27 catch (Exception innerException)
28 {
29 TaskSchedulerException exceptionObject = new TaskSchedulerException(innerException);
30 task.AddException(exceptionObject);
31 task.Finish(userDelegateExecute: false);
32 }
33 }
34
36}
static void InlineIfPossibleOrElseQueue(Task task, bool needsProtection)
void Run(Task completedTask, bool canInlineContinuationTask)