멀티플랫폼 스레드 라이브러리 준 완성
This commit is contained in:
@@ -1,2 +1,15 @@
|
||||
#include "Utils/Thread.hpp"
|
||||
|
||||
namespace Chattr {
|
||||
Thread::~Thread() {
|
||||
join();
|
||||
}
|
||||
|
||||
void Thread::join() {
|
||||
#ifdef _WIN32
|
||||
WaitForSingleObject(handle_, INFINITE);
|
||||
#elif __linux__
|
||||
pthread_join(handle_, NULL);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user