folly::bskip_detail::KeyStorage

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

NameDescription
TThe stored value type.
kOptimisticWhether the optimistic (lock-free) read path is used.