package
0.0.4
Repository: https://github.com/fengleng/go-common.git
Documentation: pkg.go.dev

# Functions

NewAtomicBool initializes a new AtomicBool with a given value.
NewAtomicDuration initializes a new AtomicDuration with a given value.
NewAtomicInt32 initializes a new AtomicInt32 with a given value.
NewAtomicInt64 initializes a new AtomicInt64 with a given value.
NewSemaphore creates a Semaphore.

# Structs

AtomicBool gives an atomic boolean variable.
AtomicDuration is a wrapper with a simpler interface around atomic.(Add|Store|Load|CompareAndSwap)Int64 functions.
AtomicInt32 is a wrapper with a simpler interface around atomic.(Add|Store|Load|CompareAndSwap)Int32 functions.
AtomicInt64 is a wrapper with a simpler interface around atomic.(Add|Store|Load|CompareAndSwap)Int64 functions.
AtomicString gives you atomic-style APIs for string, but it's only a convenience wrapper that uses a mutex.
Semaphore is a counting semaphore with the option to specify a timeout.