cpp-redis / cpp_redis

C++11 Lightweight Redis client: async, thread-safe, no dependency, pipelining, multi-platform
MIT License
720 stars 199 forks source link

is connect pool supported? #36

Open HaoLiuHust opened 5 years ago

HaoLiuHust commented 5 years ago

does this lib support connect pool?

appkins commented 5 years ago

I've been working on something similar for cluster support, though I did not plan to provide it in the API. Are you interested in connection pooling for thread safety?

Everything is pipelined in cpp-redis, so it is relatively thread safe. You must, however, be careful with the capture context in the callback parameters. I would recommend instantiating multiple clients if you run into any issues with deadlocking delays.

HaoLiuHust commented 5 years ago

Thanks for your effort, I am using acl redis for now. connection pool is using for reuse the connection to redis server