I have a plugin with a big ammount of objects/structs that processBlock() read, thousands of primitive variables. And, like usual, the interface read/write on those objects and create and delete them.
I've reading a lot about CriticalSections, ReadWriteLock, semaphores, etc but I'm confused which approach should I take. It seems that coarse lock it's not a good idea, so I was thinking in few ReadWriteLock and I have doubts between standart Juce ReadWriteLock or TheVinn's one [it seems that TheVinn's one is faster for simple purposes].
It should be something like doing a read-lock when the processBlock() or the interface try to read one of these shared objects, and doing a write lock when the interface try to write, right? Should I use the AudioProcessor::getCallbackLock() for something?
I'd appreciate any advice :)