Example #1
0
 internal static void UnsafeQueueCustomWorkItem(IThreadPoolWorkItem workItem, bool forceGlobal)
 {
     ThreadPool.EnsureVMInitialized();
     try
     {
     }
     finally
     {
         ThreadPoolGlobals.workQueue.Enqueue(workItem, forceGlobal);
     }
 }
Example #2
0
        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);
        }