Browse Source

Added a re-entrancy check to the plugin scanner, so that if plugins pump the message thread it'll avoid triggering nested scans

tags/2021-05-28
jules 6 years ago
parent
commit
19513f5725
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp

+ 6
- 1
modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp View File

@@ -399,7 +399,7 @@ private:
String pluginBeingScanned;
double progress;
int numThreads;
bool allowAsync, finished;
bool allowAsync, finished, timerReentrancyCheck = false;
std::unique_ptr<ThreadPool> pool;
static void startScanCallback (int result, AlertWindow* alert, Scanner* scanner)
@@ -518,6 +518,11 @@ private:
void timerCallback() override
{
if (timerReentrancyCheck)
return;
const ScopedValueSetter<bool> setter (timerReentrancyCheck, true);
if (pool == nullptr)
{
if (doNextScan())


Loading…
Cancel
Save