STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - Template Software for the Active Template Library COMSTL - The Standard Template Library meets the Component Object Model .netSTL - Standard Template Library meets the Microsoft.NET Common Language Runtime InetSTL - The Standard Template Library meets WinInet MFCSTL - Template Software for the Microsoft Foundation Classes UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

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

thread_mutex Class Reference

This class provides an implementation of the mutex model based on the PTHREADS mutex. More...

#include <unixstl_thread_mutex.h>

List of all members.

Public Methods

 thread_mutex (us_bool_t bRecursive=true) unixstl_throw_0()
 Creates an instance of the mutex.

 ~thread_mutex () unixstl_throw_0()
 Destroys an instance of the mutex.

void lock () unixstl_throw_0()
 Acquires a lock on the mutex, pending the thread until the lock is aquired.

bool try_lock ()
 Attempts to lock the mutex.

void unlock () unixstl_throw_0()
 Releases an aquired lock on the mutex.


Detailed Description

This class provides an implementation of the mutex model based on the PTHREADS mutex.


Constructor & Destructor Documentation

thread_mutex us_bool_t    bRecursive = true [inline, explicit]
 

Creates an instance of the mutex.

~thread_mutex   [inline]
 

Destroys an instance of the mutex.


Member Function Documentation

void lock   [inline]
 

Acquires a lock on the mutex, pending the thread until the lock is aquired.

bool try_lock   [inline]
 

Attempts to lock the mutex.

Returns:
true if the mutex was aquired, or false if not
Note:
Only available with Windows NT 4 and later

void unlock   [inline]
 

Releases an aquired lock on the mutex.


The documentation for this class was generated from the following file:

STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004