php - Does anyone know if xcache functions are atomic?
376
I'm wondering which xcache functions are atomic. I know thatxcache_inc()
andxcache_dec()
are both atomic. I dont know ifxcache_get()
andxcache_unset()
are atomic.
Answer
Solution:
The Feature List says that XCache supports "atomic get/set/inc/dec".
So
get
is atomic, whatever that means. (It probably just means thatget
never returns an in-between value, which is more or less the same thing as atomicset
.)Also, since
set
is atomic, I see no reason whyunset
wouldn't be atomic, too.