Newbie question-- how do I get a Lockable?

Sorry if this is a dumb question-- it looks like just about every kind of lock/mutex I could declare in the documentation wants to be passed a Lockable object, but I can find no such thing in any of the header files. I have the Boost Thread library installed and am able to make and run threads, and I have all sorts of other lock and mutex stuff defined, it just does not seem to correspond to the documentation at all. Am I just horribly confused about what the documentation means? Any help is greatly appreciated. ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Hi Henry, Henry Holmes wrote:
Sorry if this is a dumb question-- it looks like just about every kind of lock/mutex I could declare in the documentation wants to be passed a Lockable object, but I can find no such thing in any of the header files. I have the Boost Thread library installed and am able to make and run threads, and I have all sorts of other lock and mutex stuff defined, it just does not seem to correspond to the documentation at all. Am I just horribly confused about what the documentation means? Any help is greatly appreciated. Lockable is not a type, it is a concept. Concepts are requirements a type must comply with to be used by a type or function. The Lockable concept is defined here http://www.boost.org/doc/libs/1_35_0/doc/html/thread/synchronization.html#th... . The boost thread library provides types that implement these concepts and they may be substitued where a suitable concept is required. This is a form of polymorphism you may not be aware of. The types you may want to instantiate for your requirements are probably described here http://www.boost.org/doc/libs/1_35_0/doc/html/thread/synchronization.html#th... note that they all implement at least the Locakble concept.
HTH -- Bill Somerville Class Design Limited
participants (2)
-
Bill Somerville
-
Henry Holmes