Main Page Namespace List Class Hierarchy Compound List Compound Members

# ZThread::FastRecursiveMutex Class Reference

`#include <POSIX_FastRecursiveMutex.h>`

Inheritance diagram for ZThread::FastRecursiveMutex::

List of all members.

## Public Methods
| FastRecursiveMutex () throw (Synchronization_Exception)
virtual | ~FastRecursiveMutex () throw ()
virtual void | acquire () throw (Synchronization_Exception)
virtual void | release () throw (Synchronization_Exception)
virtual bool | tryAcquire (unsigned long) throw (Synchronization_Exception)

## Detailed Description

Author:
  Eric Crahen

Date:
  04-22-2000

Version:
  1.3.5

This is the smaller and faster implementation of a RecursiveMutex. A single thread can acquire the mutex any number of times, but it must perform a release for each acquire(). Other threads are blocked until a thread has released all of its locks on the mutex.

This particular implementation performs fewer safety checks. Like the FastMutex implementation, any waiting caused by an acquire() request is not interruptable. This is so that the mutex can have the fastest response time for a time critical application while still having a good degree of reliability.

## Constructor & Destructor Documentation

FastRecursiveMutex ( | ) throw (Synchronization_Exception)`[inline]`

| Create a new FastRecursiveMutex

~FastRecursiveMutex ( | ) throw ()`[inline, virtual]`

| Destroy this Mutex

## Member Function Documentation

void acquire ( | ) throw (Synchronization_Exception)`[virtual]`

  | Acquire the lock on this Mutex, if the lock is already held by the calling thread, then the Mutex returns immediately Exceptions:
  Synchronization_Exception |
Reimplemented from ZThread::Lockable.

void release ( | ) throw (Synchronization_Exception)`[virtual]`

  | Release the lock on this Mutex. This should be done for each time the Mutex was acquired() by the calling thread Exceptions:
  Synchronization_Exception |
Reimplemented from ZThread::Lockable.

bool tryAcquire ( | unsigned long timeout ) throw (Synchronization_Exception)`[virtual]`

  | The timeout function is not implemented on a FastRecursiveMutex This is because this Mutex is generally used when need to be locked and unlocked rather quickly, and where the lock held only for short amounts of time Returns: bool - always false Exceptions:
  Synchronization_Exception |
  Parameters:
  timeout |
Reimplemented from ZThread::Lockable.

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

- POSIX_FastRecursiveMutex.h