From 20d35eaf6a89d60bda627576678d97885b7fca91 Mon Sep 17 00:00:00 2001 From: Trond Norbye Date: Tue, 13 Oct 2009 17:31:38 +0200 Subject: [PATCH] Added documentation for memcached_mget_execute --- docs/Makefile.am | 4 ++++ docs/memcached_get.pod | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/docs/Makefile.am b/docs/Makefile.am index 772b0344..ec551276 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -74,6 +74,7 @@ man_MANS = libmemcached.3\ memcached_increment_with_initial.3\ memcached_mget.3\ memcached_mget_by_key.3\ + memcached_mget_execute.3 \ memcached_prepend.3\ memcached_prepend_by_key.3\ memcached_replace.3\ @@ -212,6 +213,9 @@ memcached_mget.3: memcached_get.pod memcached_mget_by_key.3: memcached_get.pod ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_mget_by_key.3 +memcached_mget_execute.3: memcached_get.pod + ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_mget_execute.3 + memcached_fetch.3: memcached_get.pod ${POD2MAN} -c "libmemcached" -r "" -s 3 ${top_srcdir}/docs/memcached_get.pod > memcached_fetch.3 diff --git a/docs/memcached_get.pod b/docs/memcached_get.pod index 1fe7298f..4c80fb3e 100644 --- a/docs/memcached_get.pod +++ b/docs/memcached_get.pod @@ -44,12 +44,26 @@ C Client Library for memcached (libmemcached, -lmemcached) size_t *value_length, uint32_t *flags, memcached_return *error); + memcached_return memcached_fetch_execute(memcached_st *ptr, memcached_return (*callback[])(memcached_st *ptr, memcached_result_st *result, void *context), void *context, unsigned int number_of_callbacks); + + memcached_return + memcached_mget_execute(memcached_st *ptr, + const char *master_key, + size_t master_key_length, + const char **keys, + size_t *key_length, + size_t number_of_keys, + memcached_execute_function *callback, + void *context, + unsigned int number_of_callbacks); + + =head1 DESCRIPTION memcached_get() is used to fetch an individual value from the server. You @@ -99,6 +113,15 @@ you supply the calling function. Currently only one value is being passed to each function call. In the future there will be an option to allow this to be an array. +memcached_mget_execute() is similar to memcached_mget(), but it may trigger +the supplied callbacks with result sets while sending out the queries. If +you try to perform a really large multiget with memcached_mget() you may +encounter a deadlock in the OS kernel (we fail to write data to the socket +because the input buffer is full). memcached_mget_execute() solves this +problem by processing some of the results before continuing sending out +requests. Please note that this function is only available in the binary +protocol. + memcached_get_by_key() and memcached_mget_by_key() behave in a similar nature as memcached_get() and memcached_mget(). The difference is that they take a master key that is used for determining which server an object was stored -- 2.30.2