patch sync/atomic

This commit is contained in:
xushiwei
2024-06-16 20:49:31 +08:00
parent 8c9b0285e4
commit 7b7b4e5f22
3 changed files with 35 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
package main
import (
"sync/atomic"
)
func main() {
var v int64 = 100
atomic.AddInt64(&v, 1)
println(v)
}