Files
NP_Midterm/impl/Utils/Thread.cpp

15 lines
213 B
C++

#include "Utils/Thread.hpp"
namespace Chattr {
Thread::~Thread() {
join();
}
void Thread::join() {
#ifdef _WIN32
WaitForSingleObject(handle_, INFINITE);
#elif __linux__
pthread_join(handle_, NULL);
#endif
}
}