1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Fix potential order-of-destruction bug in AvailableModulesList

When the AvailableModulesList is destroyed, it will wait for the current
module scanning job (running on a background thread) to complete. This
job will try to take the AvailableModulesList::lock when it completes,
so the lock must outlive the background thread.
This commit is contained in:
reuk 2021-11-29 13:00:09 +00:00
parent f269f1d6c9
commit 474e6d73a4
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -169,10 +169,10 @@ private:
}
//==============================================================================
std::future<void> scanner;
ModuleIDAndFolderList modulesList;
ListenerList<Listener> listeners;
CriticalSection lock;
std::future<void> scanner;
//==============================================================================
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AvailableModulesList)