private static Thread InitializeExistingThreadPoolThread()
        {
            ThreadPool.InitializeForThreadPoolThread();

            InitializeComForThreadPoolThread();

            Thread thread = CurrentThread;

            thread.SetThreadStateBit(ThreadPoolThread);
            return(thread);
        }
示例#2
0
        private static void InitializeExistingThreadPoolThread()
        {
            // Take advantage of implicit MTA initialized by the finalizer thread
            SpinWait sw = new SpinWait();

            while (!s_comInitializedOnFinalizerThread)
            {
                RuntimeImports.RhInitializeFinalizerThread();
                sw.SpinOnce(0);
            }

            // Prevent re-initialization of COM model on threadpool threads
            t_comState |= ComState.Locked;

            ThreadPool.InitializeForThreadPoolThread();
        }
示例#3
0
 private static void InitializeExistingThreadPoolThread()
 {
     ThreadPool.InitializeForThreadPoolThread();
 }