Mutiprocessor considerations


I am a bit worried about my way of programming for multiprocessor systems. In fact, I made my own GUI lib for JUCE which uses a dirty flag that signals need for repainting of the component and that can be set to true via the Audio Thread. So the Audio Thread can call myComponent->setValue(float), which sets the value of the component and sets the dirty flag to true.

The Message Loop checks, via a Timer, from time to time whether any of my components have been updated: If the dirty flag is true, then it is set to false again and the component will be repainted.

My question: Does this always work on Mac’s (OS X) and PC’s (Windows) ? The VSTGUI lib works exactly the same way and so I think it should work.

I read in a MS document, that on all machines running Windows, the memory is garantueed to look the same to all processors in the system - so on Windows there is cache consistency even between processors. So on Windows at least, this should be no problem.


Should be absolutely fine in a simple case like that.