UWP: Fix (or patch up...) a race condition in StorageFileLoader. Might help #10882, fixes some other freezes.

Not convinced it's 100% correct but it appears to work, heh. Can't be
bothered to investigate too deeply.
This commit is contained in:
Henrik Rydgård 2018-04-07 17:46:17 +02:00
parent ac898c54f3
commit 93bf866125

View File

@ -19,10 +19,12 @@ StorageFileLoader::StorageFileLoader(Windows::Storage::StorageFile ^file) {
}
StorageFileLoader::~StorageFileLoader() {
initMutex.lock();
active_ = false;
operationRequested_ = false;
cond_.notify_all();
thread_->join();
initMutex.unlock();
}
void StorageFileLoader::threadfunc() {