Default key‐read policy for T: RelaxedAtomic if hardware‐atomic, else Locked.

Synopsis

Declared in <folly/ConcurrentBSkipList‐detail.h>

template<typename T>
inline constexpr folly::KeyReadPolicy kDefaultReadPolicy = kIsHardwareAtomic<T>
    ? folly::KeyReadPolicy::RelaxedAtomic
    : folly::KeyReadPolicy::Locked;

Description

Optimistic readers may call Comp on stale‐but‐complete key values (hw‐atomic guarantees no tearing). The comparator must be safe on any complete value — no pointer dereferences, no side effects.

Template Parameters

Name

Description

T

The key type.

Created with MrDocs