title: Converting from boost unordered to tbb concurrent hash map
body: <p>I am very new to C++ and I have been searching, in vain, for a beginner's tutorial on tbb concurrent hash map. I have been using boost unordered hash map in my C++ program, and now I would like to use tbb's concurrent hash map since multiple threads will be writing to the hash map at once. </p>
  
  <p>I am doing the following four operations on boost's hash map:</p>
  
  <pre><code>typedef boost::unordered_map&lt;string, std::vector&lt;int&gt; &gt; MAP;
  MAP myMap;
  </code></pre>
  
  <ol>
  <li><p>Inserting into myMap:</p>
  
  <pre><code>string key = "somestring"
  int somevalue = 1 
  myMap[key].push_back(somevalue);
  </code></pre></li>
  <li><p>Iterating through all the keys in myMap:</p>
  
  <pre><code>BOOST_FOREACH(MAP::value_type pair, myMap)
  {
          string key  = pair.first;
  }
  </code></pre></li>
  <li><p>Returning the value associated with a key:</p>
  
  <pre><code>MAP::const_iterator iter = myMap.find("somekey");
  </code></pre></li>
  </ol>
  
  <p>How can I achieve 1, 2, and 3, using tbb concurrent hash map? Note that I perform 2 and 3 only <strong>after</strong> all threads are done with their inserts</p>