sync

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFloat32

func AddFloat32(addr *float32, delta float32) (new float32)

func AddFloat64

func AddFloat64(addr *float64, delta float64) (new float64)

AddFloat64 add delta to given address atomically

func CasItem added in v0.2.0

func CasItem(p *unsafe.Pointer, old, new *DirectItem) bool

func SubUint32

func SubUint32(addr *uint32, delta uint32) (new uint32)

func SubUint64

func SubUint64(addr *uint64, delta uint64) (new uint64)

func WaitGroupState

func WaitGroupState(wg *sync.WaitGroup) (counter int32, wcounter uint32)

WaitGroupState返回 sync.WaitGroup 的状态,

func WaitGroupStopWait

func WaitGroupStopWait(wg *sync.WaitGroup)

Types

type DirectItem added in v0.2.0

type DirectItem struct {
	Next unsafe.Pointer
	V    interface{}
}

func LoadItem added in v0.2.0

func LoadItem(p *unsafe.Pointer) *DirectItem

type WaitGroup

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

运行计数,等待计数,信号计数

func (*WaitGroup) State

func (wg *WaitGroup) State() (counter int32, wcounter uint32)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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