atomic

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Int64

type Int64 int64

Int64 is an atomic wrapper around an int64.

func NewInt64

func NewInt64(i int64) Int64

NewInt64 creates a new Int64.

func (*Int64) CAS

func (i *Int64) CAS(old, new int64) bool

CAS is an atomic compare-and-swap.

func (*Int64) Load

func (i *Int64) Load() int64

Load atomically loads the value.

func (*Int64) Store

func (i *Int64) Store(v int64)

Store atomically stores the value.

type String

type String struct {
	// contains filtered or unexported fields
}

String is an atomic wrapper around a string.

func NewString

func NewString(s string) *String

NewString creats a new String.

func (*String) Load

func (s *String) Load() string

Load atomically loads the string.

func (*String) Store

func (s *String) Store(v string)

Store atomically stores the string.

type Time

type Time struct {
	// contains filtered or unexported fields
}

Time is an atomic wrapper around a time.Time.

func NewTime

func NewTime(t time.Time) *Time

NewTime creates a new Time.

func (*Time) Load

func (t *Time) Load() time.Time

Load atomically loads the time.Time.

func (*Time) Store

func (t *Time) Store(v time.Time)

Store atomically stores the time.Time.

Jump to

Keyboard shortcuts

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