fix: free lthread resources on Windows
This commit is contained in:
parent
19dcbdcec9
commit
9dffc61e27
1 changed files with 4 additions and 0 deletions
|
|
@ -95,6 +95,10 @@ struct lthread::imp {
|
|||
}
|
||||
}
|
||||
|
||||
~imp() {
|
||||
CloseHandle(m_thread);
|
||||
}
|
||||
|
||||
void join() {
|
||||
if (WaitForSingleObject(m_thread, INFINITE) == WAIT_FAILED) {
|
||||
throw exception("failed to join thread");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue