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 ¶
SeqAtomicStore sets *ptr to a copy of val, ensuring that any racing reader critical sections are forced to retry.
func SeqAtomicStoreSeqed ¶
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 ¶
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).