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

more::cf::thread Class Reference

A descriptor for creating and controlling a thread. More...

#include <thread.h>

Inheritance diagram for more::cf::thread:

Inheritance graph
[legend]
Collaboration diagram for more::cf::thread:

Collaboration graph
[legend]
List of all members.

Public Methods

Friends


Detailed Description

A descriptor for creating and controlling a thread.


Constructor & Destructor Documentation

more::cf::thread::thread  
 

Construct an undefined thread object.

This object becomes defined afther assigning another thread object or calling set_call.

more::cf::thread::thread thread const &    x
 

Construct a shallow copy of x.

more::cf::thread::~thread  
 

Destruct a thread descriptor.

The thread data will be released when all instances of thread is out of scope and the thread has returned.

more::cf::thread::thread closure_type const &    [explicit]
 

Construct a thread which will run the given closure when started.

This is equivalend to default construction followed by a set_call.


Member Function Documentation

void more::cf::thread::cancel  
 

Throw a thread_cancel exception in the thread.

The cancellation will be acknowledged only after the code calls checkpoint().

bool more::cf::thread::is_active   const
 

True iff the thread is started and has not yet returned.

bool more::cf::thread::is_canceled   const
 

True iff the thread cancel() method has been called for this thread.

The thread has not necessarily acknowledged this and may still be running.

bool more::cf::thread::is_defined   const
 

True iff a closue has been assigned to the thread.

bool more::cf::thread::is_excepted   const
 

True iff an exception was raised in the thread.

Implies is_finished().

bool more::cf::thread::is_finished   const
 

True iff the thread has returned.

bool more::cf::thread::is_running   const
 

True iff the thread is running.

bool more::cf::thread::is_started   const
 

True iff the thread has been started.

bool more::cf::thread::join  
 

Wait for a thread to stop.

Uncaught exceptions, but not thread_canceled, will be rethrown, but with loss of type-information. That is, exceptions derived from exception, logic_error or runtime error will be rethrown as this base class.

more::cf::thread::operator bool   [inline]
 

Returns is_defined().

thread& more::cf::thread::operator= thread const &    x
 

Assign a shallow copy of x.

void more::cf::thread::set_call closure_type const &   
 

Set the closure to call.

The thread must not have been started.

void more::cf::thread::start  
 

Start the given closure in a new thread.


Friends And Related Function Documentation

friend class thread_data [friend]
 

thread thread_of_caller   [friend]
 

The thread descriptor of the thread from which this function is called.

The main thread returns an undefined descriptor at the moment, though this may change.


The documentation for this class was generated from the following file:
Generated on Sat Sep 7 19:12:03 2002 for more with Doxygen 1.2.13.1. Doxygen 1.2.13.1 is written and copyright 1997-2002 by Dimitri van Heesch.