This commit is contained in:
Luis Ángel San Martín
2020-08-31 16:04:26 +02:00
parent 04140bef0b
commit a2b4b88801
2 changed files with 4 additions and 2 deletions

View File

@ -51,8 +51,9 @@ WorkerThread<Result>::~WorkerThread()
abort = true;
}
condition.notify_one();
if (thread.joinable())
if (thread.joinable()) {
thread.join();
}
}
template<typename Result>