ZThread::PrioritySemaphore Class Reference

#include <PrioritySemaphore.h>

Inheritance diagram for ZThread::PrioritySemaphore:

ZThread::Lockable ZThread::NonCopyable List of all members.

Public Member Functions

 PrioritySemaphore (int count=1, unsigned int maxCount=1)
virtual ~PrioritySemaphore ()
void wait ()
bool tryWait (unsigned long)
void post ()
virtual int count ()
virtual bool tryAcquire (unsigned long timeout)
virtual void acquire ()
virtual void release ()

Detailed Description

Author:
Eric Crahen <http://www.code-foo.com>
Date:
<2003-07-16T15:36:07-0400>
Version:
2.2.1
A PrioritySemaphore operates in the same way as a Semaphore. Its an owner-less Lockable object that is sensitive to priority.

Scheduling

Threads blocked on a PrioritySemaphore are resumed in priority order, highest priority first.

Error Checking

An attempt to increase a PrioritySemaphore beyond its maximum value will result in an InvalidOp_Exception.

See also:
Semaphore


Constructor & Destructor Documentation

ZThread::PrioritySemaphore::PrioritySemaphore ( int  count = 1,
unsigned int  maxCount = 1 
)

See also:
Semaphore::Semaphore(int count, unsigned int maxCount)

ZThread::PrioritySemaphore::~PrioritySemaphore (  )  [virtual]

See also:
Semaphore::~Semaphore()


Member Function Documentation

void ZThread::PrioritySemaphore::acquire (  )  [virtual]

See also:
Semaphore::acquire()

Implements ZThread::Lockable.

int ZThread::PrioritySemaphore::count (  )  [virtual]

See also:
Semaphore::count()

void ZThread::PrioritySemaphore::post (  ) 

See also:
Semaphore::post()

void ZThread::PrioritySemaphore::release (  )  [virtual]

See also:
Semaphore::release()

Implements ZThread::Lockable.

bool ZThread::PrioritySemaphore::tryAcquire ( unsigned long  timeout  )  [virtual]

See also:
Semaphore::tryAcquire(unsigned long timeout)

Implements ZThread::Lockable.

bool ZThread::PrioritySemaphore::tryWait ( unsigned  long  ) 

See also:
Semaphore::tryWait(unsigned long)

void ZThread::PrioritySemaphore::wait (  ) 

See also:
Semaphore::wait()


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