3 ms·
Along with transactions, I also like to use 'Add' or 'Subtract' operations which usually provide better reliability instead of manually reading and setting, bei
by timvisee 7y ago
Along with transactions, I also like to use 'Add' or 'Subtract' operations which usually provide better reliability instead of manually reading and setting, being a source for data races.
- varelaz 7y agoYou may end up with 0xFF items on stock, add/subtract are cool, but not ideal, also negative number is not always more acceptable than exception. I recall FF bug with Civilization https://www.geek.com/games/why-gandhi-is-always-a-warmongering-jerk-in-civilization-1608515/ https://www.geek.com/games/why-gandhi-is-always-a-warmongeri...