FBX C++ API Reference
|
#include <fbxsync.h>
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.
Public Member Functions | |
FbxMutex (bool pInitialOwnership=false) | |
Constructor. More... | |
virtual | ~FbxMutex () |
Destructor. More... | |
void | Acquire () |
Acquire the lock; thread will wait indefinitely until it is available. More... | |
bool | TryAcquire (unsigned int pRetryCount) |
Try acquiring the lock; thread will not wait if it is not available. More... | |
void | Release () |
Release the lock; this will allow other threads to acquire the lock if they are waiting. More... | |
FbxMutex | ( | bool | pInitialOwnership = false | ) |
Constructor.
pInitialOwnership | If pInitialOwnership is true, the lock will be initialized as being locked by the current thread. |
|
virtual |
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.
pRetryCount | The number of retries in case the lock is not available. |
void Release | ( | ) |
Release the lock; this will allow other threads to acquire the lock if they are waiting.