Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members  

TimerThread Class Template Reference

#include <TimerThread.h>

Inheritance diagram for TimerThread:

Timer Thread Cancelable Runnable Runnable NonCopyable List of all members.

Public Methods

 TimerThread () throw (Synchronization_Exception)
virtual ~TimerThread () throw ()
virtual void cancel () throw (Synchronization_Exception)
virtual bool isCanceled () throw (Synchronization_Exception)
virtual void run () throw ()

Detailed Description

template<bool DAEMON>
class ZThread::TimerThread< DAEMON >

Author:
Eric Crahen <crahen@cse.buffalo.edu>
Date:
<2002-04-25T13:29:25-0400>
Version:
2.1.0
This is a Timer object that is based on a Thread. This template can be used to manage the lifetime of the thread correctly. A static TimerThread should be labeled as a daemon thread using the parameter template. This is very similar to how the Executor templates work.

Also, like Executors, static TimerThreads do no need to be joined while a non-static or local TimerThread should be joined.


Constructor & Destructor Documentation

TimerThread   throw (Synchronization_Exception) [inline]
 

Create a new TimerThread

virtual ~TimerThread   throw () [inline, virtual]
 

Destroy this TimerThread


Member Function Documentation

virtual void cancel   throw (Synchronization_Exception) [inline, virtual]
 

Cancel the timer altogether. No further notifications are issued from the timer thread.

Exceptions:
Synchronization_Exception 

Implements Cancelable.

virtual bool isCanceled   throw (Synchronization_Exception) [inline, virtual]
 

Check if the Timer has been Canceled

Returns:
bool - cancelation status
Exceptions:
Synchronization_Exception 

Implements Cancelable.

virtual void run   throw () [inline, virtual]
 

Delegate to timer

Reimplemented from Thread.


The documentation for this class was generated from the following file:
Generated on Fri May 31 14:08:47 2002 for ZThread by doxygen1.2.15