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:
parent
b29cb61e91
commit
19513f5725
1 changed files with 6 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue