21 #ifndef THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED 22 #define THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED 24 #include <boost/utility.hpp> 25 #include <boost/thread/mutex.hpp> 28 namespace boost {
namespace threadpool {
namespace detail 36 template <
typename T,
typename Mutex>
46 : m_obj(const_cast<T*>(&obj))
47 , m_mutex(*const_cast<Mutex*>(&mtx))
84 #endif // THREADPOOL_DETAIL_LOCKING_PTR_HPP_INCLUDED The namespace threadpool contains a thread pool and related utility classes.
Smart pointer with a scoped locking mechanism.
TupleObj.h GaudiAlg/TupleObj.h namespace with few technical implementations.
~locking_ptr()
Destructor.
T * operator->() const
Returns a pointer to the stored instance.
Mutex & m_mutex
Mutex is used for scoped locking.
locking_ptr(volatile T &obj, const volatile Mutex &mtx)
Constructor.
T & operator*() const
Returns a reference to the stored instance.
T * m_obj
The instance pointer.