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