package atomic

import "github.com/Azure/azure-sdk-for-go/sdk/internal/atomic"

Index

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.

Source Files

atomic.go

Version
v0.1.1
Published
Jun 29, 2020
Platform
windows/amd64
Imports
2 packages
Last checked
2 minutes ago

Tools for package owners.