![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
#include <FXThread.h>
Public Member Functions | |
| FXSpinLock () | |
| void | lock () |
| FXbool | trylock () |
| FXbool | locked () |
| void | unlock () |
| ~FXSpinLock () | |
It is cheaper than FXMutex, but unlike FXMutex, threads which are unable to obtain the lock will not block, but spin in a tight loop until the lock can be obtained.
| FX::FXSpinLock::FXSpinLock | ( | ) |
Initialize the spinlock.
| FX::FXSpinLock::~FXSpinLock | ( | ) |
Delete the spinlock.
| void FX::FXSpinLock::lock | ( | ) |
Lock the mutex.
| FXbool FX::FXSpinLock::trylock | ( | ) |
Return true if succeeded locking the spinlock.
| FXbool FX::FXSpinLock::locked | ( | ) |
Return true if spinlock is already locked.
| void FX::FXSpinLock::unlock | ( | ) |
Unlock spinlock.
|
|