folly::SpinLockArray

Array of spinlocks where each one is padded to prevent false sharing. Useful for shard-based locking implementations in environments where contention is unlikely.

Synopsis

Declared in <folly/synchronization/MicroSpinLock.h>

template<
    class T,
    size_t N>
struct SpinLockArray;

Member Functions

NameDescription
operator[] Returns the lock at the given index.
size Returns the number of locks in the array.