3 ms·
CAS is the correct approach. inc/dec are ok for counters but that's that. I didn't know anything about memcached - yet atomic w/o knowing the original value is
by xxs 5y ago
CAS is the correct approach. inc/dec are ok for counters but that's that. I didn't know anything about memcached - yet atomic w/o knowing the original value is an absolutely pointless operation. CAS (as in CPU compare-and-set/swap) is a universally useful approach.