atomic2

package module
v0.0.0-...-cd41441 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 2 Imported by: 5 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

atomic2

easy go std/atomic wrapper

Deprecated

use Uber/atomic instead.

GitHub Go Reference Go Report Card Go GitHub go.mod Go version (branch)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Int32

type Int32 int32

func (*Int32) Add

func (n *Int32) Add(increase int32) int32

func (*Int32) CAS

func (n *Int32) CAS(test, value int32) bool

func (*Int32) Get

func (n *Int32) Get() int32

func (*Int32) Set

func (n *Int32) Set(value int32)

func (*Int32) Sub

func (n *Int32) Sub(decrease int32) int32

func (*Int32) Swap

func (n *Int32) Swap(new int32) (old int32)

type Int64

type Int64 int64

func (*Int64) Add

func (n *Int64) Add(increase int64) int64

func (*Int64) CAS

func (n *Int64) CAS(test, value int64) bool

func (*Int64) Get

func (n *Int64) Get() int64

func (*Int64) Set

func (n *Int64) Set(value int64)

func (*Int64) Sub

func (n *Int64) Sub(decrease int64) int64

func (*Int64) Swap

func (n *Int64) Swap(new int64) (old int64)

type Ptr

type Ptr struct {
	Ptr unsafe.Pointer
}

func (*Ptr) CAS

func (ptr *Ptr) CAS(test, new unsafe.Pointer) bool

func (*Ptr) Get

func (ptr *Ptr) Get() (another unsafe.Pointer)

func (*Ptr) GetValue

func (ptr *Ptr) GetValue() interface{}

func (*Ptr) Set

func (ptr *Ptr) Set(another unsafe.Pointer)

func (*Ptr) SetValue

func (ptr *Ptr) SetValue(value interface{})

func (*Ptr) Swap

func (ptr *Ptr) Swap(new unsafe.Pointer) (old unsafe.Pointer)

func (*Ptr) SwapValue

func (ptr *Ptr) SwapValue(value interface{}) (old interface{})

type Uint

type Uint = Uintptr

type Uint32

type Uint32 uint32

func (*Uint32) Add

func (n *Uint32) Add(increase uint32) uint32

func (*Uint32) CAS

func (n *Uint32) CAS(test, value uint32) bool

func (*Uint32) Get

func (n *Uint32) Get() uint32

func (*Uint32) Set

func (n *Uint32) Set(value uint32)

func (*Uint32) Sub

func (n *Uint32) Sub(decrease uint32) uint32

func (*Uint32) Swap

func (n *Uint32) Swap(new uint32) (old uint32)

type Uint64

type Uint64 uint64

func (*Uint64) Add

func (n *Uint64) Add(increase uint64) uint64

func (*Uint64) CAS

func (n *Uint64) CAS(test, value uint64) bool

func (*Uint64) Get

func (n *Uint64) Get() uint64

func (*Uint64) Set

func (n *Uint64) Set(value uint64)

func (*Uint64) Sub

func (n *Uint64) Sub(decrease uint64) uint64

func (*Uint64) Swap

func (n *Uint64) Swap(new uint64) (old uint64)

type Uintptr

type Uintptr uintptr

func (*Uintptr) Add

func (n *Uintptr) Add(increase uintptr) uintptr

func (*Uintptr) CAS

func (n *Uintptr) CAS(test, value uintptr) bool

func (*Uintptr) Get

func (n *Uintptr) Get() uintptr

func (*Uintptr) Set

func (n *Uintptr) Set(value uintptr)

func (*Uintptr) Sub

func (n *Uintptr) Sub(decrease uintptr) uintptr

func (*Uintptr) Swap

func (n *Uintptr) Swap(new uintptr) (old uintptr)

Jump to

Keyboard shortcuts

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