class SpinLock

Synchronization primitive with low overhead.

Public

Constructors

SpinLock

SpinLock()

Methods

Lock

void Lock()

Lock any following operations with the spin lock, not allowing any other thread to access them.

Unlock

void Unlock()

Release the lock and allow other threads to acquire the lock.

Private

Fields

mLock

std::atomic_flag mLock