fix: free lthread resources on Windows

This commit is contained in:
Sebastian Ullrich 2020-09-24 14:06:13 +02:00 committed by Leonardo de Moura
parent 19dcbdcec9
commit 9dffc61e27

View file

@ -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");