atomic

package
v6.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2018 License: Apache-2.0 Imports: 1 Imported by: 1,598

Documentation

Overview

Package atomic provides common primitive types with atomic accessors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

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

Bool provides an atomic boolean type.

func MakeBool

func MakeBool(v bool) Bool

func NewBool

func NewBool(v bool) *Bool

func (*Bool) CAS

func (b *Bool) CAS(old, new bool) bool

func (*Bool) Load

func (b *Bool) Load() bool

func (*Bool) Store

func (b *Bool) Store(v bool)

func (*Bool) Swap

func (b *Bool) Swap(new bool) bool

type Int32

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

Int32 provides an atomic int32 type.

func MakeInt32

func MakeInt32(v int32) Int32

func NewInt32

func NewInt32(v int32) *Int32

func (*Int32) Add

func (i *Int32) Add(delta int32) int32

func (*Int32) CAS

func (i *Int32) CAS(old, new int32) bool

func (*Int32) Dec

func (i *Int32) Dec() int32

func (*Int32) Inc

func (i *Int32) Inc() int32

func (*Int32) Load

func (i *Int32) Load() int32

func (*Int32) Store

func (i *Int32) Store(v int32)

func (*Int32) Sub

func (i *Int32) Sub(delta int32) int32

func (*Int32) Swap

func (i *Int32) Swap(new int32) int32

type Int64

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

Int64 provides an atomic int64 type.

func MakeInt64

func MakeInt64(v int64) Int64

func NewInt64

func NewInt64(v int64) *Int64

func (*Int64) Add

func (i *Int64) Add(delta int64) int64

func (*Int64) CAS

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

func (*Int64) Dec

func (i *Int64) Dec() int64

func (*Int64) Inc

func (i *Int64) Inc() int64

func (*Int64) Load

func (i *Int64) Load() int64

func (*Int64) Store

func (i *Int64) Store(v int64)

func (*Int64) Sub

func (i *Int64) Sub(delta int64) int64

func (*Int64) Swap

func (i *Int64) Swap(new int64) int64

type Uint32

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

Uint32 provides an atomic uint32 type.

func MakeUint32

func MakeUint32(v uint32) Uint32

func NewUint32

func NewUint32(v uint32) *Uint32

func (*Uint32) Add

func (u *Uint32) Add(delta uint32) uint32

func (*Uint32) CAS

func (u *Uint32) CAS(old, new uint32) bool

func (*Uint32) Dec

func (u *Uint32) Dec() uint32

func (*Uint32) Inc

func (u *Uint32) Inc() uint32

func (*Uint32) Load

func (u *Uint32) Load() uint32

func (*Uint32) Store

func (u *Uint32) Store(v uint32)

func (*Uint32) Sub

func (u *Uint32) Sub(delta uint32) uint32

func (*Uint32) Swap

func (u *Uint32) Swap(new uint32) uint32

type Uint64

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

Uint64 provides an atomic uint64 type.

func MakeUint64

func MakeUint64(v uint64) Uint64

func NewUint64

func NewUint64(v uint64) *Uint64

func (*Uint64) Add

func (u *Uint64) Add(delta uint64) uint64

func (*Uint64) CAS

func (u *Uint64) CAS(old, new uint64) bool

func (*Uint64) Dec

func (u *Uint64) Dec() uint64

func (*Uint64) Inc

func (u *Uint64) Inc() uint64

func (*Uint64) Load

func (u *Uint64) Load() uint64

func (*Uint64) Store

func (u *Uint64) Store(v uint64)

func (*Uint64) Sub

func (u *Uint64) Sub(delta uint64) uint64

func (*Uint64) Swap

func (u *Uint64) Swap(new uint64) uint64

Jump to

Keyboard shortcuts

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