This is actually a question for a plugin host (not plugin) implementation.
I noticed that the juce::VST3PluginInstance::ParamValueQueueList acquires a lock(criticalsection actually) for getParameterCount and getParameterData functions - which may be called from the Audio Processing Thread.
This could be risky, because the same lock is also used from addParameterData - which is called from non-Audio thread - most likely running at a lower priority.
Effectively, the audio thread may have to wait for the non-audio thread to do it’s work (addParameterData - which also includes memory allocation).
This does not sound right.
Am I missing something here?