• Dmitriy Vyukov's avatar
    sync/atomic: add Value · 98a1e207
    Dmitriy Vyukov authored
    A Value provides an atomic load and store of a consistently typed value.
    It's intended to be used with copy-on-write idiom (see the example).
    
    Performance:
    BenchmarkValueRead	50000000	        21.7 ns/op
    BenchmarkValueRead-2	200000000	         8.63 ns/op
    BenchmarkValueRead-4	300000000	         4.33 ns/op
    
    TBR=rsc
    R=golang-codereviews
    CC=golang-codereviews
    https://golang.org/cl/136710045
    98a1e207
Name
Last commit
Last update
..
atomic Loading commit data...
cond.go Loading commit data...
cond_test.go Loading commit data...
example_test.go Loading commit data...
export_test.go Loading commit data...
mutex.go Loading commit data...
mutex_test.go Loading commit data...
once.go Loading commit data...
once_test.go Loading commit data...
pool.go Loading commit data...
pool_test.go Loading commit data...
race.go Loading commit data...
race0.go Loading commit data...
runtime.go Loading commit data...
runtime_sema_test.go Loading commit data...
rwmutex.go Loading commit data...
rwmutex_test.go Loading commit data...
waitgroup.go Loading commit data...
waitgroup_test.go Loading commit data...