title: how to use boost barrier
body: <p>What is boost:barrier, how to use this kind of boost method. Could you give me a clear example since I found the examples on the following:</p>
  
  <pre><code>    bool wait()
      {
          boost::mutex::scoped_lock lock(m_mutex);
          unsigned int gen = m_generation;
  
          if (--m_count == 0)
          {
              m_generation++;
              m_count = m_threshold;
              m_cond.notify_all();
              return true;
          }
  
          while (gen == m_generation)
              m_cond.wait(lock);
          return false;
      }
  </code></pre>
  
  <p>In the above codes: m_cond.notify_all();is to enter into other waiting threads? 
  Could you tell me clearly about barrier functionality? Thank you.</p>