Search code examples
phpatomicxcache

Does anyone know if xcache functions are atomic?


I'm wondering which xcache functions are atomic. I know that xcache_inc() and xcache_dec() are both atomic. I dont know if xcache_get() and xcache_unset() are atomic.


Solution

  • The Feature List says that XCache supports "atomic get/set/inc/dec".

    So get is atomic, whatever that means. (It probably just means that get never returns an in-between value, which is more or less the same thing as atomic set.)

    Also, since set is atomic, I see no reason why unset wouldn't be atomic, too.