mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
I observed a deadlock when scanning AU plugins in-process in the AudioPluginHost, and then clicking the "cancel" button in the scan progress alert window. The cause of the deadlock seems to be that JUCE uses async messages to create and destroy AU plugins on the main thread. When running a plugin scanner on a background thread, it was possible to end up in a situation where the background thread was waiting on the message thread to process a create/destroy message; and, at the same time, the main thread was blocked waiting for all scan jobs to complete. This seemed to happen because scanFinished() was called directly from the Scanner's timerCallback as soon as the progress window was cancelled, even if there was still a scan in progress at that point. To avoid the deadlock, we now wait until the current scan has completely finished before allowing the timerCallback to call scanFinished(). If no scan is in progress, then the main thread can safely destroy the scanner ThreadPool without needing to wait at that point. |
||
|---|---|---|
| .. | ||
| format | ||
| format_types | ||
| processors | ||
| scanning | ||
| utilities | ||
| juce_audio_processors.cpp | ||
| juce_audio_processors.h | ||
| juce_audio_processors.mm | ||
| juce_audio_processors_ara.cpp | ||
| juce_audio_processors_lv2_libs.cpp | ||