Spinscale: PuppetComponent takes PuppetApplication&

This commit is contained in:
2025-12-27 14:15:17 -04:00
parent f862db922e
commit 0c4f427c0a
13 changed files with 66 additions and 42 deletions
-21
View File
@@ -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