Registry / utility / alecthomas-atomic

alecthomas-atomic

JSON →
library0.1.0-alpha2gogounverified

A Go package providing type-safe atomic wrappers for numeric types with explicit initialization requirements.

go get github.com/alecthomas/atomic
INSTALL
IMPORT
SIG · ALECTHOMAS-ATOMIC
A
alecthomas-atomic
utilitygov0.1.0-alpha2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

atomic
github.com/alecthomas/atomic

Create and use an atomic int64 counter

package main import ( "fmt" "github.com/alecthomas/atomic" ) func main() { counter := atomic.NewInt64(0) counter.Add(1) fmt.Println(counter.Load()) }
Debug
Known issues
gotchaZero value of numeric types cannot be used; must use New* constructors
fix
Always initialize with NewInt64, NewUint64, etc.
affects: >=0.1.0
Upgrade
Version history
0.1.0-alpha2latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
30
Meta
1
OpenAI (training)
1
Resources
alecthomas-atomic — go get alecthomas-atomic · libregistry