1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-28 02:30:05 +00:00

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

This commit is contained in:
jules 2018-12-20 17:13:17 +00:00
parent b29cb61e91
commit 19513f5725

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())