Closed typcn closed 9 years ago
Hi,
Yes it is. You can share simple_pool
or connection_pool
classes between threads and get a usable connection object when each thread needs to use a connection. The former is useful when you have a single redis instance, the latter if you have master/slaves managed by sentinels. Follow examples here and here, if you have other questions ask here. Using C++11 lambdas, there are convenient methods to auto-retry you database related code if connection fails.
OK , Thanks for response.
I want to use redis3m in my web service , is it thread safe ?