I think you need to provide more information if you want a proper answer. What type of data structure? When is it instanciated? Where is it used? Do you have a screenshot?
You may want to add a bool to it that locks it, and set it to locked when one thing starts to modify it, then unlock when it is finished. Only allow modification if it’s not locked. You could use a timer to keep trying to modify until it’s not locked.