Created
July 29, 2017 04:08
-
-
Save shixzie/37b78ec57f0d9dabeecc1dc3747466f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Why not | |
func Add<T>(addr *T, delta T) (new T) | |
otherInt32 := atomic.Add<int32>(&myInt32, 32) | |
// Instead of | |
func AddInt32(addr *int32, delta int32) (new int32) | |
otherInt32 := atomic.AddInt32(&myInt32, 32) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment