Being not a real computer programmer, I have just discovered the existence of memory barriers (and, more importantly, of the problem they are designed to solve). Now this puts in serious danger the self-confidence I had gained in dealing with concurrency issues.
But it also leaves me with some questions, Max-wise:
- I have noticed that we have two macros ATOMIC_INCREMENT_BARRIER and ATOMIC_DECREMENT_BARRIER besides the "non-barrier" ones (the two being actually different only under OSX): but why in the examples of dealing with buffer~, at least in the Max5 SDK, the non-barrier version was used? I understand that this is exactly the case in which barrier increments are needed...
- AFAIK there the Max API doesn't contain any cross-platform barrier mechanism - how does the Cycling code deal with the issue? and how do people more experienced than me deal with it in their externals? Simply building their own macros?
... or does all this mean (as I think I have read somewhere) that this is not a real problem on the x86 architecture (while it was on the PPC)?
Thank you very much for any enlightenment!