| 295 | } |
| 296 | |
| 297 | int redis_list::pop(const char* cmd, const char* key, string& buf) |
| 298 | { |
| 299 | const char* argv[2]; |
| 300 | size_t lens[2]; |
| 301 | |
| 302 | argv[0] = cmd; |
| 303 | lens[0] = strlen(cmd); |
| 304 | argv[1] = key; |
| 305 | lens[1] = strlen(key); |
| 306 | |
| 307 | hash_slot(key); |
| 308 | build_request(2, argv, lens); |
| 309 | return (int) get_string(buf); |
| 310 | } |
| 311 | |
| 312 | bool redis_list::blpop(std::pair<string, string>& result, size_t timeout, |
| 313 | const char* first_key, ...) |