18 #ifndef _LOG4CXX_HELPERS_THREAD_H 19 #define _LOG4CXX_HELPERS_THREAD_H 21 #include <log4cxx/log4cxx.h> 22 #include <log4cxx/helpers/pool.h> 24 #if !defined(LOG4CXX_THREAD_FUNC) 26 #if defined(__MINGW32__) 27 #define LOG4CXX_THREAD_FUNC 29 #define LOG4CXX_THREAD_FUNC __stdcall 32 #define LOG4CXX_THREAD_FUNC 37 typedef struct apr_thread_t apr_thread_t;
38 typedef struct apr_thread_cond_t apr_thread_cond_t;
39 typedef struct apr_thread_mutex_t apr_thread_mutex_t;
50 typedef void* (LOG4CXX_THREAD_FUNC* Runnable)(apr_thread_t* thread,
void* data);
51 namespace ThreadLaunch
53 extern "C" void* LOG4CXX_THREAD_FUNC launcher(apr_thread_t* thread,
void* data);
74 void run(Runnable start,
void* data);
77 inline bool isActive()
88 static void sleep(
int millis);
92 static void currentThreadInterrupt();
101 static bool interrupted();
104 bool isCurrentThread()
const;
110 apr_thread_t* thread;
111 volatile unsigned int alive;
112 volatile unsigned int interruptedStatus;
113 apr_thread_mutex_t* interruptedMutex;
114 apr_thread_cond_t* interruptedCondition;
117 friend void* LOG4CXX_THREAD_FUNC ThreadLaunch::launcher(apr_thread_t* thread,
void* data);
122 #endif //_LOG4CXX_HELPERS_THREAD_H This class implements an approximation of java.util.Thread.
Definition: thread.h:59
Definition: appender.h:33