diff --git a/src/sfizz/FilePool.cpp b/src/sfizz/FilePool.cpp index 5be67c6e..cb7faa47 100644 --- a/src/sfizz/FilePool.cpp +++ b/src/sfizz/FilePool.cpp @@ -476,7 +476,7 @@ void sfz::FilePool::dispatchingJob() noexcept continue; } - std::lock_guard guard { loadingJobsMutex }; + std::lock_guard guard { loadingJobsMutex }; if (filesToLoad.try_pop(queuedData)) { loadingJobs.push_back( @@ -517,7 +517,7 @@ void sfz::FilePool::emptyFileLoadingQueues() noexcept void sfz::FilePool::waitForBackgroundLoading() noexcept { - std::lock_guard guard { loadingJobsMutex }; + std::lock_guard guard { loadingJobsMutex }; for (auto& job : loadingJobs) job.wait(); diff --git a/src/sfizz/FilePool.h b/src/sfizz/FilePool.h index 94f2fb2d..a44ce948 100644 --- a/src/sfizz/FilePool.h +++ b/src/sfizz/FilePool.h @@ -354,7 +354,7 @@ private: void dispatchingJob() noexcept; void garbageJob() noexcept; void loadingJob(QueuedFileData data) noexcept; - SpinMutex loadingJobsMutex; + std::mutex loadingJobsMutex; std::vector> loadingJobs; std::thread dispatchThread { &FilePool::dispatchingJob, this }; std::thread garbageThread { &FilePool::garbageJob, this };