title: Making a C++ class a Monitor (in the concurrent sense)
body: <p>I want to ensure that only one thread at a time can run a method of my C++ class. In other words, make the class behave like a <a href="http://en.wikipedia.org/wiki/Monitor_%28synchronization%29" rel="noreferrer">Monitor</a>.</p>
  
  <p>Is there a pattern, templatized way to do this, or some Boost class I can use? Because my only idea so far is adding a Critical Section member, and acquire it at the beginning of each method and release it at the end (using RAII, of course). But that seems very redundant, and I can't reuse it for some other class.</p>