This is a workaround for performance issues with the current implementation
when adding many regions to the selection one at a time.
If the Selection implementation was to change at some point and adding regions
to the selection only takes a small constant amount of time, then this
optimization may no longer be necessary.
Related to: #7274
Caused by thinko when merging/replacing two conditional clauses in the
string-convert changes which resulted in bindings not being restored and
regeneration of id's in XML.
ControlProtocolManager::set_state() already takes the protocols_lock.
However effectively this is a NO-OP. During ::set_state no CPI should
be instantiated and ControlProtocolManager::teardown() returns early.
Arodur itself on longer depends on C/C++ locale for saving/loading sessions.
However, the Localeguard is kept for 3rd party plugins: Reset the C locale
to "C" to enforce consisten numerics and portable sessions as well
as verify that no plugin changes the C++ locale.
Ardour translations and GUI string formatting only depends on the C locale.
Modifying the C++ locale may produce erratic results on various systems
(in particular OSX and macOS) and cause incompatibilies with plugins.
GTK events are still handled while un/loading a session (e.g display
"Loading" message or showing the splash triggers an event-loop run).
Global canvas elements (e.g. Rulers) may respond to session-specific
actions.
Since 5.8-245-g3e43585fa, a response hides the dialog Window
in ArdourDialog::on_response (to prevent dialogs windows staying
around unresponsively while Ardour does background work).
This logic does not apply to Dialog Windows which implement
ProgressReporter or support dialog responses other than OK, Close.