From ebdf7587139f8c64a3bdfef675c3345c09df92df Mon Sep 17 00:00:00 2001 From: paulfd Date: Sat, 28 Sep 2019 15:57:19 +0200 Subject: [PATCH] Change the initialization order for threads and mutexes in FilePool --- sfizz/FilePool.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sfizz/FilePool.h b/sfizz/FilePool.h index 5c0c41db..eee11e7a 100644 --- a/sfizz/FilePool.h +++ b/sfizz/FilePool.h @@ -72,11 +72,11 @@ private: void loadingThread() noexcept; void garbageThread() noexcept; bool quitThread { false }; + std::mutex fileHandleMutex; + std::vector>> fileHandles; + absl::flat_hash_map>> preloadedData; std::thread fileLoadingThread { &FilePool::loadingThread, this }; std::thread garbageCollectionThread { &FilePool::garbageThread, this }; - std::vector>> fileHandles; - std::mutex fileHandleMutex; - absl::flat_hash_map>> preloadedData; LEAK_DETECTOR(FilePool); }; }