10#ifndef _LOG4CPP_THREADING_BOOSTTHREADS_HH
11#define _LOG4CPP_THREADING_BOOSTTHREADS_HH
14#include <boost/thread/thread.hpp>
15#include <boost/thread/mutex.hpp>
16#include <boost/thread/tss.hpp>
26 return std::string(
buffer);
35 return _localData.get();
39 inline T&
operator*()
const {
return *_localData.get(); };
42 return _localData.release();
50 boost::thread_specific_ptr<T> _localData;
#define LOG4CPP_UNIQUE_PTR
Definition Portability.hh:73
This class holds Thread local data of type T, i.e.
Definition BoostThreads.hh:32
T * operator->() const
Definition BoostThreads.hh:38
T & operator*() const
Definition BoostThreads.hh:39
T * get() const
Definition BoostThreads.hh:34
void reset(T *p=NULL)
Definition BoostThreads.hh:45
T * release()
Definition BoostThreads.hh:41
boost::mutex Mutex
Dummy type 'int' for Mutex.
Definition BoostThreads.hh:29
boost::mutex::scoped_lock ScopedLock
Dummy type 'int' defintion of ScopedLock;.
Definition BoostThreads.hh:30
static std::string getThreadId()
Return an identifier for the current thread.
Definition BoostThreads.hh:22
The top level namespace for all 'Log for C++' types and classes.
Definition AbortAppender.hh:16