Skip to content

Instantly share code, notes, and snippets.

@fireyang
Created January 6, 2014 07:41
Show Gist options
  • Save fireyang/8279486 to your computer and use it in GitHub Desktop.
Save fireyang/8279486 to your computer and use it in GitHub Desktop.
atomic测试
// program
package main
import "fmt"
import "sync/atomic"
func main() {
_host_genid := int32(1)
atomic.AddInt32(&_host_genid, 1)
fmt.Printf("aaa:%d",_host_genid)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment