Subj : Re: Lockable objects To : comp.programming.threads From : Uenal Mutlu Date : Thu May 19 2005 08:06 pm A mutex can be realized in just 8 bytes (counter and threadid). These methods would be like any other method of the object: just use which you want/need/like, or don't use at all: you have the choice. The advantage of having such an "architecture" in the language gives far more possibilities for the users. And: multithreading has become a de facto standard in programming, esp. in application programming. "Torsten Robitzki" wrote 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 internally. This is just silly. Especial for c++ (and btw. what was former known as STL is part of c++ for over half a decade now) because it's a design principle of c++ that you don't have to pay for what you don't ask for. There is no reason to pack a mutex together with a container. What you are looking for might be: std::pair > ;-) .