Click to See Complete Forum and Search --> : Thead lib from boost mutex help


Razor92
November 24th, 2008, 03:17 PM
Is it possable to explicity unlock and lock a mutex using the boost thread libary. There is the scoped_lock function. But that does not offer enought control over the mutex and I keep deadlocking my code.

Thanks

Codeplug
November 24th, 2008, 03:26 PM
boost::mutex implements the "Lockable Concept" - which means it has member functions lock, try_lock, and unlock.
http://www.boost.org/doc/libs/1_37_0/doc/html/thread/synchronization.html#thread.synchronization.mutex_concepts
http://www.boost.org/doc/libs/1_37_0/doc/html/thread/synchronization.html#thread.synchronization.mutex_types.mutex

gg