mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2026-01-08 17:54:02 +00:00
DnsServer: updated min threads count code.
This commit is contained in:
@@ -131,8 +131,15 @@ namespace DnsServerCore.Dns
|
||||
{
|
||||
//set min threads since the default value is too small
|
||||
{
|
||||
int minWorker = Environment.ProcessorCount * 256;
|
||||
int minIOC = Environment.ProcessorCount * 256;
|
||||
ThreadPool.GetMinThreads(out int minWorker, out int minIOC);
|
||||
|
||||
int minThreads = Environment.ProcessorCount * 256;
|
||||
|
||||
if (minWorker < minThreads)
|
||||
minWorker = minThreads;
|
||||
|
||||
if (minIOC < minThreads)
|
||||
minIOC = minThreads;
|
||||
|
||||
ThreadPool.SetMinThreads(minWorker, minIOC);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user