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

◆ QueueWorkerIfDopAvailable()

void System.Threading.Tasks.Parallel.ForEachAsyncState< TSource >.QueueWorkerIfDopAvailable ( )
inlineinherited

Definition at line 49 of file Parallel.cs.

50 {
51 if (_remainingDop > 0)
52 {
54 Interlocked.Increment(ref _completionRefCount);
55 if (_scheduler == TaskScheduler.Default)
56 {
57 ThreadPool.UnsafeQueueUserWorkItem(this, preferLocal: false);
58 }
59 else
60 {
61 System.Threading.Tasks.Task.Factory.StartNew(_taskBody, this, default(CancellationToken), TaskCreationOptions.DenyChildAttach, _scheduler);
62 }
63 }
64 }
readonly Func< object, Task > _taskBody
Definition Parallel.cs:16
static new TaskFactory< TResult > Factory
Definition Task.cs:56

References System.Threading.Tasks.Parallel.ForEachAsyncState< TSource >._completionRefCount, System.Threading.Tasks.Parallel.ForEachAsyncState< TSource >._remainingDop, System.Threading.Tasks.Parallel.ForEachAsyncState< TSource >._scheduler, System.Threading.Tasks.Parallel.ForEachAsyncState< TSource >._taskBody, System.Threading.Tasks.TaskScheduler.Default, System.Threading.Tasks.Task< TResult >.Factory, System.Threading.Interlocked.Increment(), and System.Threading.ThreadPool.UnsafeQueueUserWorkItem().