Join Win32Threads on destruct, like std::jthread

This commit is contained in:
Robbert van der Helm
2020-10-28 21:11:34 +01:00
parent dd9957159a
commit 08cd7cf8ab
2 changed files with 16 additions and 12 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ Win32Thread& Win32Thread::operator=(Win32Thread&& o) {
return *this;
}
void Win32Thread::wait() {
Win32Thread::~Win32Thread() {
if (handle) {
WaitForSingleObject(handle.get(), INFINITE);
}