Editor processor getter setter

I’m new to Juce and programmation world and I’m actually trying to learn more about the editor/processor communication. Suppose I want to pass a float value from the editor to the processor on a mouse drag. If this float is access by the process block. Is it safe to pass it with: proc.setX(0.5); ? Is an atomic object needed ?
Thanks for the help.

There are a couple of tutorials that you can find here that explain in detail how to communicate information between the processor and the editor.

I suggest focusing on these: