Is incr/decr atomic in multithread mode?
Dean Harding
dean.harding at dload.com.au
Mon Feb 25 08:09:06 UTC 2008
dormando wrote:
> X -> set "foo" 1
> A -> incr "foo" by 1
> B -> incr "foo" by 1
>
> A -> returns 3
> B -> returns 3
That doesn't seem like "thread-safe" to me... The whole point of an
"incr" and "decr" operation would be to *make it* thread-safe
(otherwise, why not just "get" followed by a "set"? other than reducing
network round-trips anyway)
Dean.
More information about the memcached
mailing list