mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Add a todo about backing rwlocks with a spinlock
This commit is contained in:
@@ -222,6 +222,11 @@ class Vst3PluginBridge : PluginBridge<Vst3Sockets<std::jthread>> {
|
||||
* anything weird even without locks, but we'll still prevent adding or
|
||||
* removing instances while accessing other instances at the same time
|
||||
* anyways. See `Vst3Bridge::object_instances_mutex` for more details.
|
||||
*
|
||||
* TODO: At some point replace this with a multiple reader single writer
|
||||
* lock based by a spinlock. Because this lock is rarely contested
|
||||
* `get_proxy()` never yields to the scheduler during audio
|
||||
* processing, but it's still something we should avoid at all costs.
|
||||
*/
|
||||
std::shared_mutex plugin_proxies_mutex;
|
||||
|
||||
|
||||
@@ -520,6 +520,11 @@ class Vst3Bridge : public HostBridge {
|
||||
* other plugins on different threads. Since the lock should never be
|
||||
* contested, we should also not get a measurable performance penalty from
|
||||
* making double sure nothing can go wrong.
|
||||
*
|
||||
* TODO: At some point replace this with a multiple reader single writer
|
||||
* lock based by a spinlock. Because this lock is rarely contested
|
||||
* `get_instance()` never yields to the scheduler during audio
|
||||
* processing, but it's still something we should avoid at all costs.
|
||||
*/
|
||||
std::shared_mutex object_instances_mutex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user