Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Threading.ThreadPool Class Reference

Static Public Member Functions

static bool SetMaxThreads (int workerThreads, int completionPortThreads)
 
static void GetMaxThreads (out int workerThreads, out int completionPortThreads)
 
static bool SetMinThreads (int workerThreads, int completionPortThreads)
 
static void GetMinThreads (out int workerThreads, out int completionPortThreads)
 
static void GetAvailableThreads (out int workerThreads, out int completionPortThreads)
 
static unsafe bool UnsafeQueueNativeOverlapped (NativeOverlapped *overlapped)
 
static bool BindHandle (IntPtr osHandle)
 
static bool BindHandle (SafeHandle osHandle)
 
static RegisteredWaitHandle RegisterWaitForSingleObject (WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, uint millisecondsTimeOutInterval, bool executeOnlyOnce)
 
static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject (WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, uint millisecondsTimeOutInterval, bool executeOnlyOnce)
 
static RegisteredWaitHandle RegisterWaitForSingleObject (WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, int millisecondsTimeOutInterval, bool executeOnlyOnce)
 
static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject (WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, int millisecondsTimeOutInterval, bool executeOnlyOnce)
 
static RegisteredWaitHandle RegisterWaitForSingleObject (WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, long millisecondsTimeOutInterval, bool executeOnlyOnce)
 
static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject (WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, long millisecondsTimeOutInterval, bool executeOnlyOnce)
 
static RegisteredWaitHandle RegisterWaitForSingleObject (WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, TimeSpan timeout, bool executeOnlyOnce)
 
static RegisteredWaitHandle UnsafeRegisterWaitForSingleObject (WaitHandle waitObject, WaitOrTimerCallback callBack, object? state, TimeSpan timeout, bool executeOnlyOnce)
 
static bool QueueUserWorkItem (WaitCallback callBack)
 
static bool QueueUserWorkItem (WaitCallback callBack, object? state)
 
static bool QueueUserWorkItem< TState > (Action< TState > callBack, TState state, bool preferLocal)
 
static bool UnsafeQueueUserWorkItem< TState > (Action< TState > callBack, TState state, bool preferLocal)
 
static bool UnsafeQueueUserWorkItem (WaitCallback callBack, object? state)
 
static bool UnsafeQueueUserWorkItem (IThreadPoolWorkItem callBack, bool preferLocal)
 

Package Functions

static bool CanSetMinIOCompletionThreads (int ioCompletionThreads)
 
static bool CanSetMaxIOCompletionThreads (int ioCompletionThreads)
 

Static Package Functions

static void SetMinIOCompletionThreads (int ioCompletionThreads)
 
static void SetMaxIOCompletionThreads (int ioCompletionThreads)
 
static void UnsafeQueueWaitCompletion (CompleteWaitThreadPoolWorkItem completeWaitWorkItem)
 
static void RequestWorkerThread ()
 
static bool PerformRuntimeSpecificGateActivities (int cpuUtilization)
 
static bool NotifyWorkItemComplete (object threadLocalCompletionCountObject, int currentTimeMs)
 
static void ReportThreadStatus (bool isWorking)
 
static void NotifyWorkItemProgress ()
 
static bool NotifyThreadBlocked ()
 
static void NotifyThreadUnblocked ()
 
static object GetOrCreateThreadLocalCompletionCountObject ()
 
static void UnsafeQueueUserWorkItemInternal (object callBack, bool preferLocal)
 
static void UnsafeQueueTimeSensitiveWorkItemInternal (IThreadPoolWorkItem timeSensitiveWorkItem)
 
static bool TryPopCustomWorkItem (object workItem)
 
static IEnumerable< object > GetQueuedWorkItems ()
 
static IEnumerable< object > GetLocallyQueuedWorkItems ()
 
static IEnumerable< object > GetGloballyQueuedWorkItems ()
 
static object[] GetQueuedWorkItemsForDebugger ()
 
static object[] GetGloballyQueuedWorkItemsForDebugger ()
 
static object[] GetLocallyQueuedWorkItemsForDebugger ()
 

Static Package Attributes

static readonly bool UsePortableThreadPool = InitializeConfigAndDetermineUsePortableThreadPool()
 
static readonly ThreadPoolWorkQueue s_workQueue = new ThreadPoolWorkQueue()
 
static readonly Action< object > s_invokeAsyncStateMachineBox
 

Properties

static bool SupportsTimeSensitiveWorkItems [get]
 
static int ThreadCount [get]
 
static long CompletedWorkItemCount [get]
 
static long PendingUnmanagedWorkItemCount [get]
 
static bool EnableWorkerTracking [get]
 
static long PendingWorkItemCount [get]
 

Private Member Functions

static unsafe int GetNextConfigUInt32Value (int configVariableIndex, out uint configValue, out bool isBoolean, out char *appContextConfigName)
 
static int GetThreadCount ()
 
static long GetCompletedWorkItemCount ()
 
static long GetPendingUnmanagedWorkItemCount ()
 
static void QueueWaitCompletionNative (CompleteWaitThreadPoolWorkItem completeWaitWorkItem)
 
static Interop.BOOL RequestWorkerThreadNative ()
 
static Interop.BOOL PerformRuntimeSpecificGateActivitiesNative (int cpuUtilization)
 
static unsafe bool PostQueuedCompletionStatus (NativeOverlapped *overlapped)
 
static bool SetMinThreadsNative (int workerThreads, int completionPortThreads)
 
static bool SetMaxThreadsNative (int workerThreads, int completionPortThreads)
 
static void GetMinThreadsNative (out int workerThreads, out int completionPortThreads)
 
static void GetMaxThreadsNative (out int workerThreads, out int completionPortThreads)
 
static void GetAvailableThreadsNative (out int workerThreads, out int completionPortThreads)
 
static bool NotifyWorkItemCompleteNative ()
 
static void ReportThreadStatusNative (bool isWorking)
 
static void NotifyWorkItemProgressNative ()
 
static bool GetEnableWorkerTrackingNative ()
 
static IntPtr RegisterWaitForSingleObjectNative (WaitHandle waitHandle, object state, uint timeOutInterval, bool executeOnlyOnce, RegisteredWaitHandle registeredWaitHandle)
 
static bool BindIOCompletionCallbackNative (IntPtr fileHandle)
 

Static Private Member Functions

static unsafe bool InitializeConfigAndDetermineUsePortableThreadPool ()
 
static bool GetEnableWorkerTracking ()
 
static RegisteredWaitHandle RegisterWaitForSingleObject (WaitHandle waitObject, WaitOrTimerCallback callBack, object state, uint millisecondsTimeOutInterval, bool executeOnlyOnce, bool flowExecutionContext)
 
static void EnsureGateThreadRunning ()
 
static void UnsafeQueueUnmanagedWorkItem (IntPtr callback, IntPtr state)
 
static object[] ToObjectArray (IEnumerable< object > workitems)
 

Static Private Attributes

static readonly bool IsWorkerTrackingEnabledInConfig = GetEnableWorkerTracking()
 

Detailed Description

Definition at line 10 of file ThreadPool.cs.


The documentation for this class was generated from the following file: