I have an azure function that does a getObjectAsyn then a setObjectsAsync on the objects of a player, I want other azure functions that want to perform operations on the data of the same player objects to wait until my initial azure function is done before they perform their operations on the objects of that player.
The whole purpose of this is to simply make sure functions don't use data that is in the process of being changed.
for example: let's say I have an object with data = 100
If two azur functions that want to manipulate the data of that object are called nearly at the same time one is going to call, getObjectAsyn and will get data = 100 then the other is going to call getObjectAsyn and the data will also be 100. Let's say my azure functions add 1 to the data.
the first azure function will then finish and call SetObjectsAsync setting the object data value to 100+1=101 and the second azure function will also set the object data to 101 when ideally I would like the value to be 102 at the end.
Thanks for any help.