DWFCore::DWFThread Class Reference
[Platform-specific Class and Function Declarations]

#include "dwfcore/win32/Thread.h"

Inheritance diagram for DWFCore::DWFThread:

Inheritance graph
[legend]
Collaboration diagram for DWFCore::DWFThread:

Collaboration graph
[legend]
List of all members.

Detailed Description

A pooled worker thread implementation for Microsoft Windows platforms.

Since:
1.0.1

Definition at line 65 of file win32/Thread.h.

Public Types

enum  teState {
  eNone, eRun, eEnd, eKill,
  eSuspend
}
 Enumeration values that define the thread state. More...

Public Member Functions

 ~DWFThread () throw ()
void run () throw ()
void end () throw ( DWFException )
void kill () throw ( DWFException )
void suspend () throw ( DWFException )
void resume () throw ( DWFException )

Friends

class DWFThreadPool


Member Enumeration Documentation

enum DWFCore::DWFThread::teState
 

Enumeration values that define the thread state.

The thread is created in the eNone state and switches to eRun when run() is invoked; the final state is eEnd.

If the thread is suspended the current state is cached and the state is changed to eSuspend. If resumed, the state is restored to its previous value unless a state change was made during the suspension.

Enumerator:
eNone  Indicates the thread is not executing in the thread pool; the thread has not yet entered the run() method.
eRun  Indicates the thread is executing in the thread pool; the thread is inside of the run() method.
eEnd  Indicates the thread is no longer executing the thread pool; the thread has exited the run() method.
eKill  Currently only used internally for state change requests to forcibly terminate execution.
eSuspend  Indicates the thread executing in the thread pool has been suspended; the thread is inside of the run() method. This value is also used internally for state change requests.

Definition at line 83 of file win32/Thread.h.


Constructor & Destructor Documentation

DWFCore::DWFThread::~DWFThread  )  throw ()
 

Destructor

Exceptions:
None 


Member Function Documentation

void DWFCore::DWFThread::end  )  throw ( DWFException )
 

Requests the thread end normally.

Exceptions:
DWFException 

void DWFCore::DWFThread::kill  )  throw ( DWFException )
 

Request the thread terminate immediately.

Exceptions:
DWFException 

void DWFCore::DWFThread::resume  )  throw ( DWFException )
 

Request the suspended thread resume itself.

Exceptions:
DWFException 

void DWFCore::DWFThread::run  )  throw ()
 

Runs the main thread logic. This method is invoked within the thread function by the thread pool.

Exceptions:
None 

void DWFCore::DWFThread::suspend  )  throw ( DWFException )
 

Request the thread suspended itself.

Exceptions:
DWFException 


The documentation for this class was generated from the following file:
Generated on Tue Jan 6 22:39:45 2009 for Autodesk DWF Core Library by  doxygen 1.4.5