ZThread::Executor Class Reference

#include <Executor.h>

Inheritance diagram for ZThread::Executor:

ZThread::Cancelable ZThread::Waitable ZThread::NonCopyable ZThread::ConcurrentExecutor ZThread::PoolExecutor ZThread::SynchronousExecutor ZThread::ThreadedExecutor List of all members.

Public Member Functions

virtual void interrupt ()=0
virtual void execute (const Task &task)=0

Detailed Description

Author:
Eric Crahen <http://www.code-foo.com>
Date:
<2003-07-16T22:39:39-0400>
Version:
2.3.0
Execeutors are an implementation of the Executor pattern. This is a more versatile construct than a thread pool. A paper describing can be found in the proceedings of the 2002 VikingPLOP conference.

Executing

Disabling

Interrupting

Waiting

See also:
Cancelable

Waitable


Member Function Documentation

virtual void ZThread::Executor::execute ( const Task task  )  [pure virtual]

Submit a task to this Executor.

Parameters:
task Task to be run by a thread managed by this executor
Precondition:
The Executor should have been canceled prior to this invocation.
Postcondition:
The submitted task will be run at some point in the future by this Executor.
Exceptions:
Cancellation_Exception thrown if the Executor was canceled prior to the invocation of this function.

Implemented in ZThread::ConcurrentExecutor, ZThread::PoolExecutor, ZThread::SynchronousExecutor, and ZThread::ThreadedExecutor.

virtual void ZThread::Executor::interrupt (  )  [pure virtual]

If supported by the Executor, interrupt all tasks submitted prior to the invocation of this function.

Implemented in ZThread::ConcurrentExecutor, ZThread::PoolExecutor, ZThread::SynchronousExecutor, 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