4 ms·
i feel like this post creates the problem, and then solves the wrong problem
by moocowtruck 6y ago
i feel like this post creates the problem, and then solves the wrong problem
- xsmasher 6y agoYep - in order for this solution to work, all of the calls need access to the same mutex; they all need to be in the same process (this is noted toward the end). If you can do that, just share an "account" object. Calling account.balance+=50 doesn't require a mutex.