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

SynchronousExecutor Class Template Reference

#include <SynchronousExecutor.h>

Inheritance diagram for SynchronousExecutor:

Executor Cancelable Waitable NonCopyable List of all members.

Public Methods

 SynchronousExecutor ()
 Create a new SynchronousExecutor.

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

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 ZThread::SynchronousExecutor< LockType >

Author:
Eric Crahen <crahen@cse.buffalo.edu>
Date:
<2002-06-29T07:57:31-0700>
Version:
2.2.2
A SynchronousExecutor runs tasks in the current thread, but allows only one thread to do so at any given time.

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 at some later point 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]
 

See also:
Executor::wait(unsigned long)

Implements Executor.

virtual void wait   [inline, virtual]
 

See also:
Executor::wait()

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