Subj : Re: Lockable objects To : comp.programming.threads From : Torsten Robitzki Date : Thu May 19 2005 07:34 pm Uenal Mutlu wrote: > I'm predicting that in the near future all non-trivial objects the > programming language offers (esp. C++ & STL) will have > some built-in synchronization methods for the user, like: > Lock() > Unlock() > TryLock() > IsLocked() > GetLockCount() > And most probly the locking will be done by using recursive mutices int= ernally. This is just silly. Especial for c++ (and btw. what was former known as=20 STL is part of c++ for over half a decade now) because it's a design=20 principle of c++ that you don't have to pay for what you don't ask for.=20 There is no reason to pack a mutex together with a container. What you are looking for might be: std::pair > ;-) .