internal static void UnsafeQueueCustomWorkItem(IThreadPoolWorkItem workItem, bool forceGlobal) { ThreadPool.EnsureVMInitialized(); try { } finally { ThreadPoolGlobals.workQueue.Enqueue(workItem, forceGlobal); } }
private static bool QueueUserWorkItemHelper(WaitCallback callBack, object state, ref StackCrawlMark stackMark, bool compressStack) { bool flag = true; if (callBack == null) { throw new ArgumentNullException("WaitCallback"); } ThreadPool.EnsureVMInitialized(); try { } finally { QueueUserWorkItemCallback workItemCallback = new QueueUserWorkItemCallback(callBack, state, compressStack, ref stackMark); ThreadPoolGlobals.workQueue.Enqueue((IThreadPoolWorkItem)workItemCallback, true); flag = true; } return(flag); }