Go语言并发安全sync与atomic1. 原子操作var counter int64 func increment() { atomic.AddInt64(counter, 1) }2. 总结sync和atomic包提供并发安全的数据操作。