Extend pool API for fetch/release. Fix concurrency issue in test case.
[awesomized/libmemcached] / libmemcached / return.h
index d45d2e853e570d0ca24a8c6559fec5fba92f558b..fa36243f769db098cb474392384c6ba6c3d200d1 100644 (file)
@@ -84,6 +84,7 @@ enum memcached_return_t {
   MEMCACHED_PARSE_USER_ERROR,
   MEMCACHED_DEPRECATED,
   MEMCACHED_IN_PROGRESS,
+  MEMCACHED_SERVER_TEMPORARILY_DISABLED,
   MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */
 };
 
@@ -114,4 +115,15 @@ static inline bool memcached_failed(memcached_return_t rc)
           rc != MEMCACHED_VALUE);
 }
 
+static inline bool memcached_fatal(memcached_return_t rc)
+{
+  return (rc != MEMCACHED_SUCCESS && 
+          rc != MEMCACHED_END && 
+          rc != MEMCACHED_STORED && 
+          rc != MEMCACHED_STAT && 
+          rc != MEMCACHED_DELETED &&
+          rc != MEMCACHED_BUFFERED &&
+          rc != MEMCACHED_VALUE);
+}
+
 #define memcached_continue(__memcached_return_t) ((__memcached_return_t) == MEMCACHED_IN_PROGRESS)