$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Roland Richter (roland_at_[hidden])
Date: 2003-10-27 01:04:01
Dear all,
  the case: I've got a class with a mutex as member, and try
  to find out whether this->mutex is locked or not.
  The following code should find out whether it was locked
  by *another* thread:
   bool locked() const
   {
     Mutex::scoped_try_lock isLocked( mutex, false );
     return !isLocked.try_lock();
   }
  Correct?
  But how to find out whether the mutex was locked by
  the *same* thread? The docs say that a recursice_mutex
  holds some internal lock count - can this be obtained
  from outside?
- Roland