seqatomic

package
v0.0.0-...-9e0e42b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0, MIT, BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package seqatomic doesn't exist. This file must be instantiated using the go_template_instance rule in tools/go_generics/defs.bzl.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SeqAtomicStore

func SeqAtomicStore(seq *sync.SeqCount, ptr *Value, val Value)

SeqAtomicStore sets *ptr to a copy of val, ensuring that any racing reader critical sections are forced to retry.

func SeqAtomicStoreSeqed

func SeqAtomicStoreSeqed(ptr *Value, val Value)

SeqAtomicStoreSeqed sets *ptr to a copy of val.

Preconditions: ptr is protected by a SeqCount that will be in a writer critical section throughout the call to SeqAtomicStore.

Types

type Value

type Value struct{}

Value is a required type parameter.

func SeqAtomicLoad

func SeqAtomicLoad(seq *sync.SeqCount, ptr *Value) Value

SeqAtomicLoad returns a copy of *ptr, ensuring that the read does not race with any writer critical sections in seq.

func SeqAtomicTryLoad

func SeqAtomicTryLoad(seq *sync.SeqCount, epoch sync.SeqCountEpoch, ptr *Value) (val Value, ok bool)

SeqAtomicTryLoad returns a copy of *ptr while in a reader critical section in seq initiated by a call to seq.BeginRead() that returned epoch. If the read would race with a writer critical section, SeqAtomicTryLoad returns (unspecified, false).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL