Small fix in Win32 ThreadImpl.

This commit is contained in:
Martí­n Lucas Golini
2016-04-22 11:21:38 -03:00
parent 077b7cedef
commit 551c66e5c0
2 changed files with 9 additions and 0 deletions

View File

@@ -17,6 +17,13 @@ ThreadImpl::ThreadImpl( Thread * owner ) {
std::cerr << "Failed to create thread" << std::endl;
}
ThreadImpl::~ThreadImpl()
{
if ( mThread ) {
CloseHandle( mThread );
}
}
void ThreadImpl::Wait() {
if ( mThread ) { // Wait for the thread to finish, no timeout

View File

@@ -21,6 +21,8 @@ class ThreadImpl {
static UintPtr GetCurrentThreadId();
ThreadImpl( Thread * owner );
~ThreadImpl();
void Wait();