title: Is this the right approach for a thread-safe Queue class?
body: <p>I'm wondering if this is the right approach to writing a thread-safe queue in C++?</p>
  
  <pre><code>template &lt;class T&gt;
  class Queue
  {
  public:
  
  Queue() {}
  
  void Push(T&amp; a)
  {
      m_mutex.lock();
      m_q.push_back(a);
      m_mutex.unlock();
  }
  
  T&amp; Pop()
  {
      m_mutex.lock();
      T&amp; temp = m_q.pop();
      m_mutex.unlock();
      return temp;
  }
  
  private:
      std::queue&lt;t&gt; m_q;
      boost::mutex m_mutex;
  };
  </code></pre>
  
  <p>You get the idea... I'm just wondering if this is the best approach.  Thanks!</p>
  
  <p><strong>EDIT:</strong>
  Because of the questions I'm getting, I wanted to clarify that the mutex is a boost::mutex</p>