Documentation Home >> Headers >> <mutex> Header >> std::unique_lock >> std::unique_lock::owns_lock Member Function

Check whether or not *this owns a lock on a mutex.

bool owns_lock() const;

Returns:

true if *this owns a lock on a mutex, false otherwise.

Throws:

Nothing.

Header

#include <mutex>

See Also