DotNX::Core::ThreadBase Class Reference

Thread helper class. More...

Inheritance diagram for DotNX::Core::ThreadBase:

DotNX::Core::Future< ResultType >

List of all members.

Public Member Functions

 ThreadBase ()
 Default constructor.
void Start ()
 Starts the thread.
void Stop ()
 Requests the thread to stop.

Protected Member Functions

abstract void Run ()
 The actual function performed in the thread.

Protected Attributes

System.Threading.Thread thread
 The actual thread.

Properties

bool Stopped [get, set]
 true if the thread has been requested to stop, false otherwise.


Detailed Description

Thread helper class.

Provides a safe, cooperative thread interruption mechanism. TODO: Rename!


Constructor & Destructor Documentation

DotNX::Core::ThreadBase::ThreadBase (  ) 

Default constructor.


Member Function Documentation

abstract void DotNX::Core::ThreadBase::Run (  )  [protected, pure virtual]

The actual function performed in the thread.

While inheritance may not be as versatile as taking a generic callable argument, it helps distinguish what belongs to the spawned thread and what doesn't.

void DotNX::Core::ThreadBase::Start (  ) 

Starts the thread.

Exceptions:
AlreadyRunningError Thrown if the thread is already running.

void DotNX::Core::ThreadBase::Stop (  ) 

Requests the thread to stop.


Member Data Documentation

System.Threading.Thread DotNX::Core::ThreadBase::thread [protected]

The actual thread.


Property Documentation

bool DotNX::Core::ThreadBase::Stopped [get, set, protected]

true if the thread has been requested to stop, false otherwise.


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

SourceForge.net Logo
Generated on Sat Oct 18 14:13:26 2008 for .Nick's 0.1.0 by  doxygen 1.5.7.1