Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-01-31 15:34:57

On Thu, 31 Jan 2002, bill_kempf wrote:
willia> I've already done that much. The lock.hpp file defines a lock_ops
willia> class that does precisely this, though it's in detail land instead of
willia> exposed in the public interface.

lock_ops is a little different. Here's what I'm thinking the usage syntax
would look like:

mutex m;

where mutex_access_private() is a helper function that creates the

template <class Mutex>
class mutex_private_accessor {
  mutex_private_accessor(Mutex& m) : m_mtx(m) { }
  void lock() { m_mtx.lock(); }
  Mutex& m_mtx;

template <class Mutex>
mutex_private_accessor<Mutex> mutex_access_private(Mutex& m)
  return mutex_private_accessor<Mutex>(m);

willia> The real issue here is actually how to interact with
willia> boost::condition, however. I can't quite see how to document this
willia> well enough in the public interface to allow for mutex extensions
willia> that work with the condition variable.

Hmm, I'd have to understand the problem better...


 Jeremy Siek
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster ( office phone: (812) 855-3608

Boost list run by bdawes at, gregod at, cpdaniel at, john at