3 ms·
Based on a quick scan through the code, there are a lot of mutexes there, e.g. for reference counts, that could be replaced with atomics.
by lukeh 5y ago
Based on a quick scan through the code, there are a lot of mutexes there, e.g. for reference counts, that could be replaced with atomics.
- KerrAvon 5y agoAlso based on a a quick scan: the mutex appears to be used for other state in the plugin. For better performance and stability they should consider changing the mutex to an os_unfair_lock and maybe find a way to avoid dispatch_async to a global queue. And I’m not convinced the locking is correct around/within the dispatch_async blocks. But it might be fine.
- fbanon 5y agoThere is no locking on the audio path. Mutexes are fine for protecting metadata access. Don't use atomics unless it would measurably improve hot-path performance.