Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

P::CriticalSection Class Reference
[Core library]

Critical section synchronization object. More...

#include <pcriticalsection.h>

List of all members.

Public Member Functions

 CriticalSection () throw ()
 Constructor.

 ~CriticalSection () throw ()
 Destructor.

void lock () throw ()
 Lock the critical section.

bool tryLock () throw ()
 Try locking the critical section.

void unlock () throw ()
 Unlock the critical section.


Detailed Description

Critical section synchronization object.

Critical section objects provide synchronization similar to that provided by mutex objects, except that critical section objects can be used only by the threads of a single process, and they are slightly faster.

Author:
Christian Prochnow <cproch@seculogix.de>

Definition at line 36 of file pcriticalsection.h.


Constructor & Destructor Documentation

P::CriticalSection::CriticalSection  )  throw ()
 

Constructor.

P::CriticalSection::~CriticalSection  )  throw ()
 

Destructor.


Member Function Documentation

void P::CriticalSection::lock  )  throw ()
 

Lock the critical section.

Tries to lock the critical section, if another thread currently owns the critical section, the caller will block until the critical section becomes available.

Referenced by P::CriticalSection::Lock::operator=().

bool P::CriticalSection::tryLock  )  throw ()
 

Try locking the critical section.

void P::CriticalSection::unlock  )  throw ()
 

Unlock the critical section.


The documentation for this class was generated from the following file:
Generated on Fri Mar 12 21:08:33 2004 for P::Classes by doxygen 1.3.3