ZThread::Cancelable Class Reference

#include <Cancelable.h>

Inheritance diagram for ZThread::Cancelable:

ZThread::Executor ZThread::Queue< T > ZThread::Thread ZThread::ConcurrentExecutor ZThread::PoolExecutor ZThread::SynchronousExecutor ZThread::ThreadedExecutor ZThread::BlockingQueue< T, LockType, StorageType > ZThread::BoundedQueue< T, LockType, StorageType > ZThread::LockedQueue< T, LockType, StorageType > ZThread::MonitoredQueue< T, LockType, StorageType > List of all members.

Public Member Functions

virtual ~Cancelable ()
 Destroy a Cancelable object.
virtual void cancel ()=0
virtual bool isCanceled ()=0

Detailed Description

Author:
Eric Crahen <http://www.code-foo.com>
Date:
<2003-07-16T09:28:46-0400>
Version:
2.3.0
The Cancelable interface defines a common method of adding general disable-and-exit semantics to some object. By cancel()ing a Cancelable object, a request is made to disable that object.

Disabling

A cancel()ed object may not necessarily abort it work immediately. Often, it much more elegant for a cancel()ed object to complete handling whatever responsibilities have been assigned to it, but it will not take on any new responsibility.

Exiting

A cancel()ed should complete its responsibilities as soon as possible. Canceling is not only a request to stop taking on new responsibility, and to complete its current responsibility. Its also a request to complete dealing with its current responsibilities, quickly when possible.


Member Function Documentation

virtual void ZThread::Cancelable::cancel (  )  [pure virtual]

Canceling a Cancelable object makes a request to disable that object. This entails refusing to take on any new responsibility, and completing its current responsibilities quickly.

Canceling an object more than once has no effect.

Postcondition:
The Cancelable object will have permanently transitioned to a disabled state; it will now refuse to accept new responsibility.

Implemented in ZThread::BlockingQueue< T, LockType, StorageType >, ZThread::BoundedQueue< T, LockType, StorageType >, ZThread::ConcurrentExecutor, ZThread::LockedQueue< T, LockType, StorageType >, ZThread::MonitoredQueue< T, LockType, StorageType >, ZThread::PoolExecutor, ZThread::Queue< T >, ZThread::SynchronousExecutor, ZThread::Thread, and ZThread::ThreadedExecutor.

virtual bool ZThread::Cancelable::isCanceled (  )  [pure virtual]

Determine if a Cancelable object has been canceled.

Returns:
  • true if cancel() was called prior to this function.
  • false otherwise.

Implemented in ZThread::BlockingQueue< T, LockType, StorageType >, ZThread::BoundedQueue< T, LockType, StorageType >, ZThread::ConcurrentExecutor, ZThread::LockedQueue< T, LockType, StorageType >, ZThread::MonitoredQueue< T, LockType, StorageType >, ZThread::PoolExecutor, ZThread::SynchronousExecutor, ZThread::Thread, and ZThread::ThreadedExecutor.


The documentation for this class was generated from the following file:
Generated on Wed Aug 30 03:27:47 2006 for SWG EMU by  doxygen 1.4.7