线程池

https://msdn.microsoft.com/zh-cn/library/system.threading.threadpool(v=vs.110).aspx

最基础的

 class Program

    {

        static void Main(string[] args)

        {

            int oldMaxWorkingThreads, oldMaxCompletionPortThreads;



            ThreadPool.GetMaxThreads(out oldMaxWorkingThreads, out oldMaxCompletionPortThreads);



            int oldMinWorkingThreads, oldMinCompletionPortThreads;



            ThreadPool.GetMinThreads(out oldMinWorkingThreads, out oldMinCompletionPortThreads);



            Console.WriteLine(string.Format("oldMaxWorkingThreads={0},oldMaxCompletionPortThreads={1}", oldMaxWorkingThreads, oldMaxCompletionPortThreads));

            Console.WriteLine(string.Format("oldMinWorkingThreads={0},oldMinCompletionPortThreads={1}", oldMinWorkingThreads, oldMinCompletionPortThreads));



            Console.WriteLine(Environment.ProcessorCount);//cpu的核数



            Console.ReadKey();

        }

    }

 

 

http://blog.zhaojie.me/2009/07/thread-pool-1-the-goal-and-the-clr-thread-pool.html

浅谈线程池(上):线程池的作用及CLR线程池

http://www.cnblogs.com/JeffreyZhao/archive/2009/07/24/thread-pool-2-dedicate-pool-and-io-pool.html  

浅谈线程池(中):独立线程池的作用及IO线程池

http://blog.zhaojie.me/2009/10/thread-pool-3-lab.html

浅谈线程池(下):相关试验及注意事项

 

你可能感兴趣的:(线程池)