- Main Page
- Classes
- Files
- Directories

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# FbxMutex Class Reference

Search for all occurrences

## Detailed Description

Mutually excluding thread lock mechanism.

While the mutex is a much heavier implementation than a spinlock, it supports recursive locking; the same thread can safely lock the same mutex more than once without blocking. But it will have to be released as many times as it as been acquired before other threads can acquire the context. It is sometimes referred as a critical section. This is the heaviest thread lock implementation, but also the most secure.

Definition at line 59 of file fbxsync.h.

`#include <fbxsync.h>`

List of all members.

## Public Member Functions
| FbxMutex (bool pInitialOwnership=false)
| Constructor.
virtual | ~FbxMutex ()
| Destructor.
void | Acquire ()
| Acquire the lock; thread will wait indefinitely until it is available.
bool | TryAcquire (unsigned int pRetryCount)
| Try acquiring the lock; thread will not wait if it is not available.
void | Release ()
| Release the lock; this will allow other threads to acquire the lock if they are waiting.

## Constructor & Destructor Documentation

FbxMutex | ( | bool | pInitialOwnership = `false` | ) |

Constructor.

Parameters:

  pInitialOwnership | If pInitialOwnership is true, the lock will be initialized as being locked by the current thread.

virtual ~FbxMutex | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

void Acquire | ( |  | ) |

Search for all occurrences

Acquire the lock; thread will wait indefinitely until it is available.

Remarks:
  The same thread can acquire the lock multiple times without blocking.

bool TryAcquire | ( | unsigned int | pRetryCount | ) |

Search for all occurrences

Try acquiring the lock; thread will not wait if it is not available.

Parameters:

  pRetryCount | The number of retries in case the lock is not available.

Returns:
  True if the lock is acquired, false otherwise.

Remarks:
  The same thread can acquire the lock multiple times without blocking.

void Release | ( |  | ) |

Search for all occurrences

Release the lock; this will allow other threads to acquire the lock if they are waiting.

Remarks:
  Only the owner thread should call Release(), and it needs to be released as many times as it was acquired.

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

- fbxsdk/core/sync/fbxsync.h

FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex
FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex FbxMutex