Thread safe moving value between two objects
I have problem. Consider following class:
what i want to do is to thread safe move amount from one "Foo" object, to another that it won't overflow above "MaxAmount".
A bif more context: It is for game for items stacking purpose, it is used server side so two clients at once may attempt to move items.
Please focus on thread safety aspect
what i want to do is to thread safe move amount from one "Foo" object, to another that it won't overflow above "MaxAmount".
A bif more context: It is for game for items stacking purpose, it is used server side so two clients at once may attempt to move items.
Please focus on thread safety aspect