Classes | Public Member Functions

Semaphore Class Reference

A synchronization primitive for multithreaded applications. Multiple Get() method calls from one process will deadlock the calling process, this is the main difference from Mutex. More...

#include <Semaphore.h>

List of all members.

Classes

class  Scoped_Lock
 Semaphore is acquired on Scoped_Lock construction and released on destruction. More...

Public Member Functions

 Semaphore ()
 Constructor, creates unnamed semaphore object.
unsigned int Get (unsigned int timeout=INFINITE)
 Gets the semaphore. If it is not free then waits (blocking) for specified timeout and either gets the semaphore or returns an error. If no error was encountered returns 0.
unsigned int Release ()
 Releases the semaphore allowing other threads to access the mutex-protected resource.

Detailed Description

A synchronization primitive for multithreaded applications. Multiple Get() method calls from one process will deadlock the calling process, this is the main difference from Mutex.

MCPN Logo
kr0st © 2010