FBX C++ API Reference
|
#include <fbxsync.h>
A spinlock is the fastest and most simple thread lock mechanism available.
It is very efficient since it does not use any operating system calls; it is only a test and set on an atomic variable, thus it is the fastest thread lock available. Spinlocks are efficient if threads are only likely to be blocked for a short period of time, as they avoid overhead from operating system process re-scheduling or context switching. However, spinlocks become wasteful if held for longer durations, both preventing other threads from running and requiring re-scheduling.
Public Member Functions | |
FbxSpinLock () | |
void | Acquire () |
Acquire the lock; thread will wait indefinitely until it is available. More... | |
void | Release () |
Release the lock; this will allow other threads to acquire the lock if they are waiting. More... | |
FbxSpinLock | ( | ) |
void Acquire | ( | ) |
Acquire the lock; thread will wait indefinitely until it is available.
void Release | ( | ) |
Release the lock; this will allow other threads to acquire the lock if they are waiting.