atomic

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

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
}

func (*Bool) Get

func (a *Bool) Get() bool

func (*Bool) Set

func (a *Bool) Set(b bool)

type Int32

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

Int32 提供原子操作

func (*Int32) Add

func (a *Int32) Add(i int)

Add 计数增加 i ,减操作:Add(-1)

func (*Int32) Get

func (a *Int32) Get() int32

Get 获取值

func (*Int32) Swap

func (a *Int32) Swap(i int) int32

Swap 交换值,并返回原来的值

type Int64

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

Int64 提供原子操作

func (*Int64) Add

func (a *Int64) Add(i int)

Add 计数增加 i ,减操作:Add(-1)

func (*Int64) Get

func (a *Int64) Get() int64

Get 获取值

func (*Int64) Swap

func (a *Int64) Swap(i int) int64

Swap 交换值,并返回原来的值

Jump to

Keyboard shortcuts

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