26 Jun
2014
26 Jun
'14
11:46 a.m.
Dear all, does anybody know if there is a possibility to check if a mutex is locked? There is an 'owns_lock' on the lock type but not on the mutex. The main use case for me is debugging (and documentation) purposes: void MyClass::Process() { boost::unique_lockboost::mutex lck(m_mtx); ProcessImpl(); } void MyClass::ProcessImpl() { _ASSERT(m_mtx.is_locked()); //does not exist :( }