Hi, Trond. I have read the man page for  the function memcached_pool_pop(), but 
I still don't know what's the meaning of the parameter bool block. 
 
I think the libmemcached uses the pool to store the memcached_st, and 
memcached_st keeps a connection with each server in the configuration 
string.But, can multiple memcached_st be stored in the same pool? Can a 
memcached_st be poped multiple times? Does it mean a pool can only keep a long 
cnnection with each server in the configuration string. 
          Thank you for your reply.
            
 
--- 11年8月11日,周四, Trond Norbye <trond.nor...@gmail.com> 写道:


发件人: Trond Norbye <trond.nor...@gmail.com>
主题: Re: Can anyone tell me the benifit of libmemcached pool?
收件人: memcached@googlegroups.com
日期: 2011年8月11日,周四,下午6:48


make install will also install a manual page for the functions..


Cheers,

Trond



On Thu, Aug 11, 2011 at 10:29 AM, 然 安 <nuanran...@yahoo.com.cn> wrote:







Hi, if I define a memcached pool like this:
memcached_pool_st* pool=memcached_pool("--SERVER=ip:port",config_length);
can I pop memcached_st multiple times use this pool? like:
memcached_st *memc1 = memcached_pool_pop(pool,false,&rc);
memcached_st *memc2 = memcached_pool_pop(pool,false,&rc);
 
can anywhere I find the detailed explanation of these functions, including the 
returen value and parameters?
thank you very much!
--- 11年7月30日,周六, Brian Aker <br...@tangent.org> 写道:


发件人: Brian Aker <br...@tangent.org>

主题: Re: Can anyone tell me the benifit of libmemcached pool?
收件人: memcached@googlegroups.com
日期: 2011年7月30日,周六,上午7:02





BTW it works out well for non-threaded applications as well, since it is a 
pretty easy API to use for just caching the connection between page calls (i.e. 
and application running in Apache)

On Jul 29, 2011, at 12:45 PM, Trond Norbye wrote:

> You would use a pool of libmemcached instances in your multithreaded 
> application to avoid initiating, connect, disconnect and destroy each time 
> one of the threads wants to send a request to the memcached cluster. Instead 
> you can get an instance from the pool, use it, and put it back in the pool 
> for other threads to use..
> 
> Cheers
> 
> Trond
> 




-- 
Trond Norbye

Reply via email to