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();
173 bool definitiveCancel(
const Timeout& timeout = Timeout::relative(60));
174 bool definitiveCancel(UInt32 waitForCooperativeSecs) BLOCXX_DEPRECATED;
226 static void testCancel();
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)
319 ThreadImpl::sleep(milliSeconds);
330 ThreadImpl::sleep(timeout);
352 friend void ThreadImpl::testCancel();
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.
BLOCXX_EXPORT_TEMPLATE(BLOCXX_COMMON_API, Array, Bool)