Add an explicit wait to our thread wrapper

This commit is contained in:
Robbert van der Helm
2020-10-28 20:40:19 +01:00
parent 93e01dacef
commit d81759c929
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -42,6 +42,12 @@ Win32Thread& Win32Thread::operator=(Win32Thread&& o) {
return *this;
}
void Win32Thread::wait() {
if (handle) {
WaitForSingleObject(handle.get(), INFINITE);
}
}
Win32Thread::Win32Thread() : handle(nullptr, nullptr) {}
Win32Timer::Win32Timer(HWND window_handle,