before class ParameterValueQueue, class ParameterChanges
and class ParameterChanges its stated, that these example implementations wouldn’t be thread-safe; is that comment a left-over, or are they really not
I cannot find a reason why they wouldn’t be thread-safe. They don’t use global data and one plugin only needs one set of automation parameters at a time.
They cannot be accessed through multi-threading due to the design of the “changes” array with the read and write index, as long as that is not interlocked. Is that why they are considererd to be not thread-safe?
Or do I miss something?
If the host uses this class in different threads and in one thread addPoint is called and in the other thread getPoint or clear is called, you will have a problem… If the host uses it in a controlled way, it is ok to use this implementation.