Thank to all for continuing to look over my posts. Everyone has been a great help.
I have an array that I fill with data in my main class. I also have a global index tracking where I am at in my array.
In another class, I decrement this index and use the information. The goal is simply to track where I am 'at' in terms of gathered information verses used information.
What if I am adding data to my array and incrementing my counter WHILE I am decrementing my counter in the other array? Do I need a synclock? If so could someone try to explain how to use it as if to a complete newb? I am very familiar with embedded systems but have just been learning as I go with GUI. Never taken a class or anything. I have been reading online but still do not feel confident enough to write the code expecting it to work.
Thanks for the help.
I have an array that I fill with data in my main class. I also have a global index tracking where I am at in my array.
In another class, I decrement this index and use the information. The goal is simply to track where I am 'at' in terms of gathered information verses used information.
What if I am adding data to my array and incrementing my counter WHILE I am decrementing my counter in the other array? Do I need a synclock? If so could someone try to explain how to use it as if to a complete newb? I am very familiar with embedded systems but have just been learning as I go with GUI. Never taken a class or anything. I have been reading online but still do not feel confident enough to write the code expecting it to work.
Thanks for the help.