Rene Rivera wrote:
Markus Schöpflin wrote:
Rene Rivera wrote:
Read the above carefully... It doesn't say there aren't lock/unlock calls. Only that mutexes don't provide them. You are free to shoot yourself by manually locking and unlocking "Locks". Which will lock/unlock the associated mutex.
But there is no class which models the Lock concept, or is there?
There is..
http://www.boost.org/doc/html/threads/concepts.html#threads.concepts.Mutex
In that section you'll see that there's a M::scoped_lock type that implements the ScopedLock concept. And if you continue reading you can see that each mutex variant has such a type to correspond to the type of Lock concept they support.
Pardon me for being dense, but I don't see what you are referring to on this page. In Table 10.11, the Lock concept doesn't have any model. AFAIK, you can only work with dynamically allocated locks as Dave outlined in another post. But OTOH, perhaps I'm just beeing blind when reading the page. Markus