I am using LabView for an imaging project. In the code I have two separate while loops running (for the most part) independently. The small dependence -if this is a dependence at all- comes from the fact that the first loop is continuously taking an input image and storing it in a temporary buffer; each iteration of the loop replaces what is in this image buffer. Now the second loop takes whatever is in that buffer at the moment an iteration starts and does some processing.
My question: How is a buffer overwritten? Does it replace one pixel's worth of data at at a time? Could the second loop access the buffer while the buffer is in mid-process of being over-written and thus generate a faulty output?