Public Member Functions

FbxSpinLock Class Reference

Search for all occurrences

Detailed Description

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.

Note:
Spinlocks does not support recursive locking. A thread attempting to lock the same spinlock twice will wait indefinitely.

Definition at line 38 of file fbxsync.h.

#include <fbxsync.h>

List of all members.

Public Member Functions

 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.

Constructor & Destructor Documentation


Member Function Documentation

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.


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

FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock
FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock FbxSpinLock