Support Forum       G3D Web Page     
Public Member Functions | List of all members
G3D::Spinlock Class Reference

A mutual exclusion lock that busy-waits when locking. More...

Public Member Functions

 Spinlock ()
 
void lock ()
 Busy waits until the lock is unlocked, then locks it exclusively. More...
 
void unlock ()
 

Detailed Description

A mutual exclusion lock that busy-waits when locking.

On a machine with one (significant) thread per processor core, a Spinlock may be substantially faster than a mutex.

Constructor & Destructor Documentation

◆ Spinlock()

G3D::Spinlock::Spinlock ( )
inline

Member Function Documentation

◆ lock()

void G3D::Spinlock::lock ( )
inline

◆ unlock()

void G3D::Spinlock::unlock ( )
inline

documentation generated on Wed Nov 24 2021 08:02:00 using doxygen 1.8.15