Fix synchronization bug in StorageFileLoader.cpp (wrong mutex)

This commit is contained in:
Henrik Rydgård committed 2020-12-19 13:17:53 +01:00
1 parent 222bf5c02c
commit 97e75bb563
1 file changed
+6 -5
+6 -5
View File
@@ -20,12 +20,13 @@ StorageFileLoader::StorageFileLoader(Windows::Storage::StorageFile ^file) {
}
StorageFileLoader::~StorageFileLoader() {
initMutex.lock();
active_ = false;
operationRequested_ = false;
cond_.notify_all();
{
std::unique_lock<std::mutex> lock(mutex_);
active_ = false;
operationRequested_ = false;
cond_.notify_all();
}
thread_->join();
initMutex.unlock();
}
void StorageFileLoader::threadfunc() {