Example #1
0
int populate_hashmap(int i)
{
	std::this_thread::sleep_for(std::chrono::nanoseconds(i*i*i*i*i*i*i));
	cout<<"Move-assigned thread creation for value "<<i<<" ..."<<endl;
	hashmap.emplace(std::make_pair(std::to_string(i),i));
	if (i%2 == 0)
	{
		hashmap.max_load_factor(hashmap.max_load_factor()*3);
	}
	else
	{
		hashmap.rehash(3);
	}
}