// Get thread pool information
int workerThreadsMin, completionPortThreadsMin;
ThreadPool.GetMinThreads(out workerThreadsMin, out completionPortThreadsMin);
int workerThreadsMax, completionPortThreadsMax;
ThreadPool.GetMaxThreads(out workerThreadsMax, out completionPortThreadsMax);
// Adjust min threads
ThreadPool.SetMinThreads(workerThreadsMax, completionPortThreadsMin);
c#中减少Task异步任务新启动时的申请间隔代码
最新推荐文章于 2021-12-25 17:32:13 发布