int get(int key) { // this will do // shared_lock<shared_mutex> lk(s_mtx); rw_lock.ReadLock(); int hash_key = hash(key); int ret = -1; for(auto it = m_map[hash_key].begin(); it != m_map[hash_key].end(); it++) { if((*it).first == key) { ret = (*it).second; break; } } rw_lock.ReadUnLock(); return ret; }