39 #ifndef BLOCXX_THREAD_HPP_INCLUDE_GUARD_
40 #define BLOCXX_THREAD_HPP_INCLUDE_GUARD_
41 #include "blocxx/BLOCXX_config.h"
55 namespace BLOCXX_NAMESPACE
104 bool shutdown(
const Timeout& timeout);
133 void cooperativeCancel();
229 void cancel_internal(
bool is_locked);
240 virtual void doShutdown();
256 virtual void doCooperativeCancel();
265 virtual void doDefinitiveCancel();
272 return m_isRunning ==
true;
282 bool timedWait(
const Timeout& timeout);
317 static void sleep(UInt32 milliSeconds)
346 virtual Int32 run() = 0;
359 static Int32 threadRunner(
void* paramPtr);
Thread_t getId()
Get this Thread object's id.
BLOCXX_EXPORT_TEMPLATE(BLOCXX_COMMON_API, Array, Bool)
Descriptions of exceptions thrown assume that the object is used correctly, i.e., method precondition...
const UInt32 INFINITE_TIMEOUT BLOCXX_DEPRECATED
Value that means infinite timeout.
Atomic_t m_cancelRequested
IntrusiveReference< ThreadDoneCallback > ThreadDoneCallbackRef
BLOCXX_COMMON_API void testCancel()
Test if this thread has been cancelled.
static Timeout relative(float seconds)
A timeout can be absolute, which means that it will happen at the specified DateTime.
BLOCXX_COMMON_API void cancel(Thread_t threadID)
void sleep(UInt32 milliSeconds)
Suspend execution of the current thread until the given number of milliSeconds have elapsed...
NonRecursiveMutex m_stateGuard
static void yield()
Voluntarily yield to the processor giving the next thread in the chain the opportunity to run...
static void sleep(const Timeout &timeout)
Suspend execution of the current thread until the given number of seconds have elapsed.
#define BLOCXX_DECLARE_APIEXCEPTION(NAME, LINKAGE_SPEC)
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typical...
Note that descriptions of what exceptions may be thrown assumes that object is used correctly...
void yield()
Voluntarily yield to the processor giving the next thread in the chain the opportunity to run...
static void sleep(UInt32 milliSeconds)
Suspend execution of the current thread until the given number of milliSeconds have elapsed...
The Condition class represents a synchronization device that allows threads to suspend execution and ...