Spinscale: PuppetComponent takes PuppetApplication&
This commit is contained in:
@@ -245,25 +245,4 @@ void Mind::finalizeReq(Callback<mindLifetimeMgmtOpCbFn> callback)
|
||||
request.get(), request)));
|
||||
}
|
||||
|
||||
void Mind::distributeAndPinThreadsAcrossCpus()
|
||||
{
|
||||
int cpuCount = ComponentThread::getAvailableCpuCount();
|
||||
|
||||
if (OptionParser::getOptions().verbose) {
|
||||
std::cout << __func__ << ": Available CPUs: " << cpuCount << "\n";
|
||||
}
|
||||
|
||||
// Distribute and pin threads across CPUs
|
||||
int threadIndex = 0;
|
||||
for (auto& thread : componentThreads)
|
||||
{
|
||||
int targetCpu = threadIndex % cpuCount;
|
||||
thread->pinToCpu(targetCpu);
|
||||
++threadIndex;
|
||||
}
|
||||
|
||||
std::cout << __func__ << ": Distributed " << threadIndex << " threads "
|
||||
<< "across " << cpuCount << " CPUs\n";
|
||||
}
|
||||
|
||||
} // namespace smo
|
||||
|
||||
Reference in New Issue
Block a user