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

ThreadedExecutor Class Template Reference

#include <ThreadedExecutor.h>

Inheritance diagram for ThreadedExecutor:

Executor Cancelable Waitable NonCopyable List of all members.

Public Methods

 ThreadedExecutor ()
 Create a new ThreadedExecutor.

virtual ~ThreadedExecutor () throw ()
 Destroy a ThreadedExecutor.

virtual void execute (const RunnableHandle &task)
void execute (Runnable *task)
virtual void cancel ()
virtual bool isCanceled ()
virtual void wait ()
virtual bool wait (unsigned long)

Detailed Description

template<class LockType, class FactoryType = DefaultThreadFactory>
class ZThread::ThreadedExecutor< LockType, FactoryType >

Author:
Eric Crahen <crahen@cse.buffalo.edu>
Date:
<2002-06-29T07:58:00-0700>
Version:
2.2.2
A ThreadedExecutor runs each task in a different thread.

Submitting a NullTask will allow you to wait() for all real tasks being executed to complete; and not just to be serviced (started).

See also:
Executor.


Member Function Documentation

virtual void cancel   [inline, virtual]
 

See also:
Executor::cancel()

Implements Executor.

void execute Runnable   task [inline]
 

Convience method

See also:
Executor::execute(const RunnableHandle&)

Reimplemented from Executor.

virtual void execute const RunnableHandle &    task [inline, virtual]
 

Submit a light wieght task to an Executor. This will not block the calling thread very long. The submitted task will be executed by another thread.

Exceptions:
Cancellation_Exception  thrown if a task is submited when the executor has been canceled.
Synchronization_Exception  thrown is some other error occurs.
See also:
Executor::execute(RunnableHandle&)

Implements Executor.

virtual bool isCanceled   [inline, virtual]
 

See also:
Executor::isCanceled()

Implements Cancelable.

virtual bool wait unsigned    long [inline, virtual]
 

Since a ThreadedExecutor starts a new Thread for each task, tasks are always being serviced and there is nothing to wait for.

See also:
Executor::wait(unsigned long)

Implements Executor.

virtual void wait   [inline, virtual]
 

Since a ThreadedExecutor starts a new Thread for each task, tasks are always being serviced and there is nothing to wait for.

See also:
Executor::wait(unsigned long)

Implements Executor.


The documentation for this class was generated from the following file:
Generated on Tue Aug 27 07:43:15 2002 for ZThread by doxygen1.2.17