If you can read this text, it means you are not experiencing this website at its best. This website is designed for used with a standards-compliant browser.
Current version: 2.3.2
ZThreads
A platform-independent, multi-threading and synchronization library for C++
Home Documentation Downloads CVS Contact
PrioritySemaphore Class Reference

#include <PrioritySemaphore.h>

Inheritance diagram for PrioritySemaphore:
Lockable NonCopyable

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 ()
Public Member Functions inherited from Lockable
virtual ~Lockable ()
 Destroy a Lockable object.

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

◆ PrioritySemaphore()

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

◆ ~PrioritySemaphore()

virtual ~PrioritySemaphore ( )
virtual

Member Function Documentation

◆ acquire()

virtual void acquire ( )
virtual
See also
Semaphore::acquire()

Implements Lockable.

◆ count()

virtual int count ( )
virtual

◆ post()

void post ( )

◆ release()

virtual void release ( )
virtual
See also
Semaphore::release()

Implements Lockable.

◆ tryAcquire()

virtual bool tryAcquire ( unsigned long timeout)
virtual

◆ tryWait()

bool tryWait ( unsigned long )

◆ wait()

void wait ( )

The documentation for this class was generated from the following file:
  • PrioritySemaphore.h