패킷 정의, 로그가 더 많이 설명하도록 변경

This commit is contained in:
2025-04-30 20:13:20 +09:00
parent b662823726
commit af414e58a1
9 changed files with 222 additions and 12 deletions

View File

@@ -7,12 +7,14 @@ ThreadPool::ThreadPool(std::uint32_t numThreads) {
int numCPU = numThreads;
if (numThreads == 0) {
#ifdef _WIN32
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
numCPU = sysinfo.dwNumberOfProcessors;
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
numCPU = sysinfo.dwNumberOfProcessors;
#elif __linux__
numCPU = sysconf(_SC_NPROCESSORS_ONLN);
numCPU = sysconf(_SC_NPROCESSORS_ONLN);
#endif
spdlog::info("Auto-detected cpu count: {}", numCPU);
spdlog::info("Setting ThreadPool Worker count to: {}", numCPU);
}
workers_.reserve(numCPU);