I'm new to Juce. I was been able to get up-and-running and built a few textbook examples of filters just to learn the Juce landscape. I wanted to improve the design of my plug-in as it always computes the filter coefficients at the top of the processBlock function rather than re-computing them only when a UI parameter changes. I've been reading through the forums on this and it seems there are lock-free solutions for this (e.g., bazrush, TheVinn, Juce's lock-free FIFO, etc). A few solutions call out that they are one reader / one writer solutions -- is safe to always assume this in audio plug-ins?
As an example, the UI will have call-backs run on some thread and the audio processing will happen in a separate thread, so I should be able to write into the FIFO in the UI thread and read from the FIFO in the audio thread. The thing that is bothering me is that I thought I read somewhere in the forum (can't find it now for the life of me...) that it is possible for parameter updates to happen in the audio thread immediately before processBlock. So, that would mean that both the UI thread and the audio thread are writing to the FIFO. 1) can that happen and 2) wouldn't that wreak havok on one-reader-one-writer FIFOs?