Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions VoltDB.Data.Client/Connections/Internal/CallbackExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ public void Start()
// calculation)
int workerThreads;
int completionPortThreads;
ThreadPool.GetMinThreads(out workerThreads, out completionPortThreads);
// **** the no. of worker thread shall be the no. of processors and not the minimum no. of threads of pool.
// ThreadPool.GetMinThreads(out workerThreads, out completionPortThreads);
workerThreads = Environment.ProcessorCount;
completionPortThreads = Environment.ProcessorCount;

int processingThreadCount = Math.Max(workerThreads - 3, 2); // -3 is for: 1 Client thread + at least 2 connection threads.
Threads = new Thread[processingThreadCount];

Expand Down Expand Up @@ -207,4 +211,4 @@ private void BackgroundThreadRun()
catch { }
}
}
}
}