Main Page Namespace List Class Hierarchy Compound List Compound Members

# ZThread::FastMutex Class Reference

`#include <POSIX_FastMutex.h>`

Inheritance diagram for ZThread::FastMutex::

List of all members.

## Public Methods
| FastMutex () throw (Synchronization_Exception)
virtual | ~FastMutex () 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:
  09-21-2000

Version:
  1.1.0

This is the smallest and fastest synchronization object in the library. It is an implementation of fast mutex, an all or nothing exclusive lock. It should be used only where you need speed and are willing to sacrifice all the state & safety checking provided by the framework for speed.

There are two important differences from the other Mutex classes. The first and most important one is speed. It operates about 20 - 25 faster on average than the normal Mutex.

## Constructor & Destructor Documentation

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

  | Create a new FastMutex. No safety or state checks are performed. Exceptions:
  Initialization_Exception | - not thrown

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

| Destroy a FastMutex. No safety or state checks are performed.

## Member Function Documentation

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

  | Acquire an exclusive lock. No safety or state checks are performed. This is not a recursive function. Exceptions:
  Synchronization_Exception | - not thrown
Reimplemented from ZThread::Lockable.

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

  | Release an exclusive lock. No safety or state checks are performed. The caller should have already acquired the lock, and release it only once. Exceptions:
  Synchronization_Exception | - not thrown
Reimplemented from ZThread::Lockable.

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

  | Not implemented Returns: bool - Always false Exceptions:
  Synchronization_Exception | - not thrown
  Parameters:
  timeout |
Reimplemented from ZThread::Lockable.

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

- POSIX_FastMutex.h