Picks the leaf‐slot storage type for a key/value type T.

Synopsis

Declared in <folly/ConcurrentBSkipList‐detail.h>

template<
    typename T,
    bool kOptimistic>
using KeyStorage = std::conditional_t<!kOptimistic, T, AtomicSlot<T>>;

Description

!kOptimistic → plain T (read under leaf mutex) kOptimistic → AtomicSlot<T> (single‐instruction relaxed atomic load)

Template Parameters

Name

Description

T

The stored value type.

kOptimistic

Whether the optimistic (lock‐free) read path is used.

Created with MrDocs