Thread 고치기
This commit is contained in:
@@ -16,15 +16,8 @@ Thread::~Thread() {
|
||||
spdlog::critical("There is not joined thread");
|
||||
std::exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
void* Thread::join() {
|
||||
#ifdef _WIN32
|
||||
WaitForSingleObject(handle_, INFINITE);
|
||||
#elif __linux__
|
||||
pthread_join(handle_, returnValue);
|
||||
#endif
|
||||
return returnValue;
|
||||
if (returnValuePtr != nullptr)
|
||||
delete returnValuePtr;
|
||||
}
|
||||
|
||||
void Thread::detach() {
|
||||
|
||||
Reference in New Issue
Block a user