I have an array of some data type (int, string, or even user defined class objects) and several threads in my program. I want to be able to find if the array has been updated after it was initialized with some values. One idea is to associate the hash of values in the array and whenever I want to check if the array has been updated, recalculate the hash. Is there any other way of doing it in c++ ? or can we check if the range of memory address has been updated since we last checked or not?

Thanks