임시저장

This commit is contained in:
2025-04-30 07:29:07 +09:00
parent 1703974310
commit 89633f94a2
5 changed files with 55 additions and 29 deletions

View File

@@ -42,6 +42,18 @@ int main() {
Chattr::ThreadPool threadPool(3);
/*int returnedIntager = 0;
int passvalue = 2;
threadPool.enqueueJob([](int& i){
spdlog::info("JobTest");
if (i == 2) {
i = 1;
return 2;
}
return 1;
}, returnedIntager, std::ref(passvalue));
Sleep(1000);*/
while (true) {
spdlog::info("Waiting for connection...");
@@ -49,8 +61,8 @@ int main() {
threadPool.enqueueJob(_TCPClient, std::move(clientSock), clientAddr);
//Chattr::Thread thread_(_TCPClient, std::move(clientSock), clientAddr);
//thread_.detach();
Chattr::Thread thread_(_TCPClient, std::move(clientSock), clientAddr);
thread_.detach();
}
}