Common base of leaf and internal nodes: next pointer, seqlock, and mutex.

Synopsis

Declared in <folly/ConcurrentBSkipList‐detail.h>

template<typename Traits>
struct BSkipNode;

Type Aliases

Name

Description

KeyStorage

The key slot storage type.

Seq

The seqlock type used to bracket concurrent access.

T

The key type.

Member Functions

Name

Description

BSkipNode [constructor]

Constructs a node and registers its fields with the thread sanitizer.

loadNextMinKey

Loads the minimum key of the successor node.

Protected Member Functions

Name

Description

annotateBaseRaces

Registers the node's shared fields with the thread sanitizer as benign races.

Protected Data Members

Name

Description

level_

Node level; set once at allocation and immutable thereafter.

mutex_

Shared/exclusive mutex guarding locked‐path access.

nextMinKey_

Cached minimum key of the successor node.

next_

Pointer to the next node at this level; readers pair load(acquire) with the release in publishSplitSibling.

numElements_

Number of live elements in this node.

seq_

Seqlock bracketing optimistic reads of this node.

Friends

Name

Description

folly::bskip_detail::AdaptiveReadGuard

RAII read guard that starts optimistic and escalates to the shared lock when a writer is in flight.

folly::ConcurrentBSkipList

Concurrent B‐skip‐list container; declared here for friend declarations.

Derived Classes

Name

Description

BSkipNodeInternal

Internal (routing) node holding separator keys and child pointers.

BSkipNodeLeaf

Leaf node holding sorted keys, optional payloads, and tombstone bits.

Template Parameters

Name

Description

Traits

The InternalTraits for the list.

Created with MrDocs