mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 12:10:09 +02:00
Properly forward arguments in Win32Thread
This commit is contained in:
@@ -25,14 +25,6 @@ uint32_t WINAPI win32_thread_trampoline(std::function<void()>* entry_point) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Win32Thread::~Win32Thread() {
|
||||
// Imitate std::jthread's joining behaviour, the thread handle will be
|
||||
// cleaned up by the `std::unique_ptr`
|
||||
if (handle) {
|
||||
WaitForSingleObject(handle.get(), INFINITE);
|
||||
}
|
||||
}
|
||||
|
||||
Win32Thread::Win32Thread(Win32Thread&& o) : handle(std::move(o.handle)) {}
|
||||
|
||||
Win32Thread& Win32Thread::operator=(Win32Thread&& o) {
|
||||
|
||||
Reference in New Issue
Block a user