seqatomic

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

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

Go to latest
Published: Dec 9, 2022 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

This section is empty.

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