Barracuda Application Server C/C++ Reference
ThreadSemaphore Struct Reference

Detailed Description

A simple semaphore implementation.

The semaphore class is used as a simple mechanism where one thread can send a message to another thread. This means that the underlying implementation of the thread class does not necessarily have to be a semaphore.

#include <ThreadLib.h>

Inherits ThreadSemaphoreBase.

Public Member Functions

 ThreadSemaphore ()
 Create a semaphore and set the counter to zero.
 ~ThreadSemaphore (void)
 destroy the semaphore
void wait ()
 Wait (block) for another thread to signal (start) the thread.
void signal ()
 Signal a waiting (blocking) thread.