package
1.3.48
Repository: https://github.com/sandwich-go/boost.git
Documentation: pkg.go.dev

# README

xsync

同步辅助函数

  • boolstringtime.Timeint32int64uint32uint64 原子性操作
  • sync.Cond 封装扩展
  • 支持设置指定 timeoutsync.WaitGroup

例子

var b AtomicBool
fmt.Println(b.Get())
b.Set(true)
fmt.Println(b.Get())

Output:

false
true

# Functions

NewAtomicString creates a new String.
No description provided by the author
WaitContext performs a timed wait on a given sync.WaitGroup.
WaitTimeout performs a timed wait on a given sync.WaitGroup.

# Structs

AtomicBool is an atomic type-safe wrapper for bool values.
AtomicString is an atomic type-safe wrapper for string values.
AtomicTime is an atomic type-safe wrapper for time.Time values.
Cond is an alternate implementation of sync.Cond.
WaitGroupTimeout is a wrapper of sync.WaitGroup that supports wait with timeout.

# Type aliases

AtomicDuration is an atomic type-safe wrapper for duration values.
AtomicInt32 is an atomic type-safe wrapper for int32 values.
AtomicInt64 is an atomic type-safe wrapper for int64 values.
AtomicUint32 is an atomic type-safe wrapper for uint32 values.
AtomicUint64 is an atomic type-safe wrapper for uint64 values.