I’m working on scanning plugins using PluginDirectoryScanner
and would prefer to synchronize my data by moving it back onto the main thread once the scan is complete, using an implementation that looks like this
mScanThread = std::make_unique<std::thread>([this]
{
juce::VST3PluginFormat vst3Format;
juce::KnownPluginList results;
juce::PluginDirectoryScanner scanner(results, vst3Format, vst3Format.getDefaultLocationsToSearch(), true, juce::File());
juce::String name;
while(scanner.scanNextFile(true, name));
juce::MessageManager::callAsync([r = std::move(results), this]
{
mKnownPlugins = std::move(r);
});
});
However, since KnownPluginList
is marked as non-copyable, it is implicitly non-movable, leaving me in a disappointing situation.
I don’t see any reason why this object should be non-movable, so perhaps this can be considered as a future improvement?