Standard library / sync/atomic
atomic.Uintptr
A typed atomic uintptr with a usable zero value. Do not copy after first use. Prefer typed atomics to raw pointer functions for new code. Expected stdout: '0\n3\n'.
Formal Syntax & Structure
go syntaxgo
type Uintptr struct {}Working Example
Example Snippetgo
package main
import ( "fmt" "sync/atomic")
func main() { var x atomic.Uintptr; fmt.Println(x.Load()); x.Add(3); fmt.Println(x.Load()) }