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

Projucer: Fixed some issues flagged by tsan

This commit is contained in:
ed 2020-05-04 10:20:48 +01:00
parent 17622e9139
commit 2a58bf980f
2 changed files with 11 additions and 3 deletions

View file

@ -21,7 +21,7 @@
#include "jucer_ModuleDescription.h"
//==============================================================================
class AvailableModulesList
class AvailableModulesList : private AsyncUpdater
{
public:
using ModuleIDAndFolder = std::pair<String, File>;
@ -164,6 +164,11 @@ private:
};
//==============================================================================
void handleAsyncUpdate() override
{
listeners.call ([this] (Listener& l) { l.availableModulesChanged (this); });
}
std::unique_ptr<ThreadPoolJob> createScannerJob (const Array<File>& paths)
{
return std::make_unique<ModuleScannerJob> (paths, [this] (ModuleIDAndFolderList scannedModulesList)
@ -173,7 +178,7 @@ private:
modulesList.swap (scannedModulesList);
}
listeners.call ([this] (Listener& l) { MessageManager::callAsync ([&] { l.availableModulesChanged (this); }); });
triggerAsyncUpdate();
});
}

View file

@ -805,7 +805,10 @@ void ProjectSaver::saveExporter (ProjectExporter& exporter, const OwnedArray<Lib
exporter.create (modules);
if (! exporter.isCLion())
std::cout << "Finished saving: " << exporter.getName() << std::endl;
{
auto exporterName = exporter.getName();
MessageManager::callAsync ([exporterName] { std::cout << "Finished saving: " << exporterName << std::endl; });
}
}
catch (build_tools::SaveError& error)
{