A small, non‐recursive spin lock with a standard lock interface.

Synopsis

Declared in <folly/SpinLock.h>

class SpinLock;

Member Functions

Name

Description

SpinLock [constructor]

Construct an unlocked spin lock.

lock

Acquire the lock, spinning until it is available.

try_lock

Try to acquire the lock without spinning.

unlock

Release the lock.

Created with MrDocs