Speed up loading sessions with synths

LV2 plugins may add a MIDNAM file when they're loaded.
This can be happen concurrently with the MidiPatchManager,
loading the system-wide patch files.

Session load should not be interrupted by the initial
background scan of patch files, which can take a very long time.
We need to allow update_custom_midnam() to grab the _lock.
This commit is contained in:
Robin Gareus 2020-04-26 04:55:59 +02:00
parent 8399abd277
commit 0067a4596d
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
1 changed files with 1 additions and 1 deletions

View File

@ -278,9 +278,9 @@ MidiPatchManager::load_midnams ()
pthread_set_name ("MIDNAMLoader");
{
Glib::Threads::Mutex::Lock lm (_lock);
PBD::Unwinder<bool> npc (no_patch_changed_messages, true);
for (Searchpath::const_iterator i = _search_path.begin(); i != _search_path.end(); ++i) {
Glib::Threads::Mutex::Lock lm (_lock);
add_midnam_files_from_directory (*i);
}
}