Hey guys, Im having a bit of code logic problem right now; See.. I have a feature which allows my users to trade credits, however since I have so many people using the site that at a certain moment, one of the reciving users may get double sent to them since they are happening in such a short time. Since I can only credit them after the sending members completes a set of tasks, during those times, someone else may be doing those same tasks for the same receving member, so they could be both sending credits to one user which only should get 1 credit.
Im thinking about putting a lock on the receiving user once the sender starts to do the tasks, but... then what if that member quits in the middle of those tasks and the receiver would still be locked...
What should I do? Thanks!