Subj : Re: Lockable objects To : comp.programming.threads From : Giancarlo Niccolai Date : Sat May 21 2005 01:35 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 > internally. Mutulu, are you really serious? It's on the first page of any threading book! if ( IsLocked(X) ) { <<< Here another thread locks X >>> // do something believing X is not locked // and bang. } That's why no-one ever implemented an IsLocked primitive. I am beginning to suspect you are a troll; so, please, are you SERIOUS about threading or are you making jokes of us? Giancarlo. .