23 #ifndef __ccxx_Thread_hxx 24 #define __ccxx_Thread_hxx 67 Thread(
bool detached =
false,
size_t stackSize = 0);
79 Thread(
Runnable* runnable,
bool detached =
false,
size_t stackSize = 0);
109 bool isRunning()
const;
113 {
return(_detached); }
116 void setPriority(
Priority priority);
142 static Thread* currentThread();
160 virtual void cleanup();
195 #ifdef CCXX_OS_WINDOWS 201 pthread_attr_t _attrs;
205 #ifdef CCXX_OS_WINDOWS 206 static DWORD WINAPI _startupDispatcher(LPVOID arg);
207 static void _cleanupTLS();
209 static void* _startupDispatcher(
void* arg);
210 static void _cleanupDispatcher(
void* arg);
221 #endif // __ccxx_Thread_hxx
void setName(const String &name)
Set the name of this thread.
Definition: Thread.h++:122
String getName() const
Get the name of this thread.
Definition: Thread.h++:126
pthread_t ThreadHandle
Definition: Common.h++:223
pthread_t ThreadID
Definition: Common.h++:224
An integer counter whose value is modified in an atomic fashion.
Definition: AtomicCounter.h++:36
#define COMMONCPP_API
Definition: Common.h++:126
A flexible, reference counted, copy-on-write, thread-safe, nullable string.
Definition: String.h++:50
Priority
Thread and Process priority levels.
Definition: Common.h++:307
#define CCXX_COPY_DECLS(CLASS)
Inlines declarations of a copy constructor and assignment operator for the class CLASS.
Definition: Common.h++:295
A runnable object.
Definition: Runnable.h++:35
int timespan_ms_t
A timespan expressed in milliseconds.
Definition: Integers.h++:104
A thread of execution.
Definition: Thread.h++:55
Definition: AllocationMap.c++:25
bool isDetached() const
Test if the thread is detached.
Definition: Thread.h++:112