Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# IdeThread Class Reference

Thread encapsulation structure. More...

`#include <deThread.hpp>`

List of all members.

## Public Types
typedef u32(* | ThreadProc )(void *)
| ThreadProc is the function signature for thread execution routines.
typedef void(* | MessageHandler )(void)
## Public Member Functions
virtual deBoolean | Start (void *parameter)=0
virtual deBoolean | IsRunning ()=0
| Test whether the thread is executing.
virtual u32 | GetReturnValue (deBoolean waitForExit=(DE_TRUE))=0
virtual s32 | Release ()=0
virtual void | Join (MessageHandler handler)=0
## Protected Member Functions
virtual | ~IdeThread ()

## Detailed Description

Thread encapsulation structure.

## Member Typedef Documentation

typedef void(* IdeThread::MessageHandler)(void)

typedef u32(* IdeThread::ThreadProc)(void*)

| ThreadProc is the function signature for thread execution routines.

## Constructor & Destructor Documentation

virtual IdeThread::~IdeThread | ( |  | ) | `[inline, protected, virtual]`

## Member Function Documentation

virtual u32 IdeThread::GetReturnValue | ( | deBoolean | waitForExit = (DE_TRUE) | ) | `[pure virtual]`

  | Retrieves the value returned by the thread execution routine. Note: if the thread has not been started or has not completed, the return value is undefined. Parameters:
  waitForExit | Causes the querying thread to block until the queried thread terminates.
Returns: The value returned by the associated ThreadProc.

virtual deBoolean IdeThread::IsRunning | ( |  | ) | `[pure virtual]`

| Test whether the thread is executing.

virtual void IdeThread::Join | ( | MessageHandler | handler | ) | `[pure virtual]`

  | Wait for the target thread to finish executing, with an optional message-handler callback. If the system receives any signals for this thread while waiting for the target thread to terminate, the message handler will be executed. Parameters:
  handler | a callback to be called when any system events arrive for the calling thread.

virtual s32 IdeThread::Release | ( |  | ) | `[pure virtual]`

| Releases & destroys a thread. This will block until the thread completes execution. Note that the block would cause a deadlock if called from the thread being contained, so such a call will fail - the thread must be released from within another thread.

virtual deBoolean IdeThread::Start | ( | void * | parameter | ) | `[pure virtual]`

  | Begin execution of the associated routine, passing in the specified parameter. This method can fail if a thread is already running or if the operating system cannot start the routine. Parameters:
  parameter | Value to pass into the thread execution routine.
Returns: deTRUE if thread was started successfully, deFALSE on failure.

The documentation for this class was generated from the following file:

- include/deThread.hpp