Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::strict_lock< Lockable > Class Template Reference

#include <strict_lock.hpp>

Public Types

typedef Lockable mutex_type
 

Public Member Functions

 strict_lock (mutex_type &mtx)
 Constructor from a mutex reference. More...
 
 strict_lock (std::initializer_list< thread_detail::lockable_wrapper< Lockable > > l_)
 
 ~strict_lock ()
 Destructor. More...
 
mutex_typemutex () const BOOST_NOEXCEPT
 
bool owns_lock () const BOOST_NOEXCEPT
 
bool owns_lock (const mutex_type *l) const BOOST_NOEXCEPT
 

Member Typedef Documentation

template<typename Lockable>
typedef Lockable boost::strict_lock< Lockable >::mutex_type

Constructor & Destructor Documentation

template<typename Lockable>
boost::strict_lock< Lockable >::strict_lock ( mutex_type mtx)
inlineexplicit

Constructor from a mutex reference.

Parameters
mtxthe mutex to lock.

__Effects: Stores a reference to the mutex to lock and locks it. __Throws: Any exception BasicMutex::lock() can throw.

template<typename Lockable>
boost::strict_lock< Lockable >::strict_lock ( std::initializer_list< thread_detail::lockable_wrapper< Lockable > >  l_)
inline
template<typename Lockable>
boost::strict_lock< Lockable >::~strict_lock ( )
inline

Destructor.

__Effects: unlocks the stored mutex.

__Throws

Member Function Documentation

template<typename Lockable>
mutex_type* boost::strict_lock< Lockable >::mutex ( ) const
inline
Returns
the owned mutex.

Referenced by boost::strict_lock< Lockable >::owns_lock().

template<typename Lockable>
bool boost::strict_lock< Lockable >::owns_lock ( ) const
inline
Returns
whether this lock is locking a mutex.
template<typename Lockable>
bool boost::strict_lock< Lockable >::owns_lock ( const mutex_type l) const
inline
Returns
whether this lock is locking that mutex.

References boost::strict_lock< Lockable >::mutex().


The documentation for this class was generated from the following file: