diff --git a/README.md b/README.md index 96b47a1..f3fdb9c 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ provide a safer, more convenient API. var atom atomic.Uint32 atom.Store(42) atom.Sub(2) -atom.CAS(40, 11) +atom.CompareAndSwap(40, 11) ``` See the [documentation][doc] for a complete API specification. diff --git a/example_test.go b/example_test.go index 806e11c..a422b16 100644 --- a/example_test.go +++ b/example_test.go @@ -33,7 +33,7 @@ func Example() { // The wrapper ensures that all operations are atomic. atom.Store(42) fmt.Println(atom.Inc()) - fmt.Println(atom.CAS(43, 0)) + fmt.Println(atom.CompareAndSwap(43, 0)) fmt.Println(atom.Load()) // Output: