Go to the documentation of this file.
39 #ifndef BLOCXX_THREAD_HPP_INCLUDE_GUARD_
40 #define BLOCXX_THREAD_HPP_INCLUDE_GUARD_
41 #include "blocxx/BLOCXX_config.h"
66 class BLOCXX_COMMON_API Thread :
public IntrusiveCountableBase
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)
328 static void sleep(
const Timeout& timeout)
346 virtual Int32 run() = 0;
359 static Int32 threadRunner(
void* paramPtr);
const UInt32 INFINITE_TIMEOUT BLOCXX_DEPRECATED
Value that means infinite timeout.
IntrusiveReference< ThreadDoneCallback > ThreadDoneCallbackRef
BLOCXX_COMMON_API void cancel(Thread_t threadID)
void yield()
Voluntarily yield to the processor giving the next thread in the chain the opportunity to run.
BLOCXX_COMMON_API void testCancel()
Test if this thread has been cancelled.
static Timeout relative(float seconds)
#define BLOCXX_DECLARE_APIEXCEPTION(NAME, LINKAGE_SPEC)
Declare a new exception class named <NAME>Exception that derives from Exception This macro is typical...
BLOCXX_EXPORT_TEMPLATE(BLOCXX_COMMON_API, Array, Bool)
Descriptions of exceptions thrown assume that the object is used correctly, i.e., method precondition...
Note that descriptions of what exceptions may be thrown assumes that object is used correctly,...
The Condition class represents a synchronization device that allows threads to suspend execution and ...
A timeout can be absolute, which means that it will happen at the specified DateTime.
void sleep(UInt32 milliSeconds)
Suspend execution of the current thread until the given number of milliSeconds have elapsed.