| 21 | const int ThreadNumber = 100; |
| 22 | |
| 23 | void RedisTest(Redis* r, int clientID){ |
| 24 | |
| 25 | for (int i = 0; i < 5; i++){ |
| 26 | std::string ClientString = std::move(std::to_string(clientID)); |
| 27 | |
| 28 | std::string temp = "x " + ClientString + " " + std::to_string(i) + " y"; |
| 29 | r->set(ClientString.c_str(), temp.c_str()); |
| 30 | |
| 31 | std::cout << r->get(ClientString.c_str()) << std::endl; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | int main(){ |
| 36 | std::vector<std::thread> Threads(ThreadNumber); |