mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 07:27:44 +01:00
prevent multiple concurrent plugin scans.
This commit is contained in:
parent
87b89a605f
commit
700c7b225f
2 changed files with 8 additions and 0 deletions
|
|
@ -144,6 +144,8 @@ class LIBARDOUR_API PluginManager : public boost::noncopyable {
|
|||
std::string get_ladspa_category (uint32_t id);
|
||||
std::vector<uint32_t> ladspa_plugin_whitelist;
|
||||
|
||||
Glib::Threads::Mutex _lock;
|
||||
|
||||
static PluginManager* _instance; // singleton
|
||||
PluginManager ();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -225,6 +225,12 @@ PluginManager::~PluginManager()
|
|||
void
|
||||
PluginManager::refresh (bool cache_only)
|
||||
{
|
||||
Glib::Threads::Mutex::Lock lm (_lock, Glib::Threads::TRY_LOCK);
|
||||
|
||||
if (!lm.locked()) {
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_TRACE (DEBUG::PluginManager, "PluginManager::refresh\n");
|
||||
_cancel_scan = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue