1
0
mirror of https://github.com/golang/go synced 2024-11-20 04:14:49 -07:00
go/src/sync/atomic
Dmitriy Vyukov 98a1e207e2 sync/atomic: add Value
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
2014-09-16 19:54:26 -07:00
..
64bit_arm.go
asm_386.s
asm_amd64.s
asm_amd64p32.s
asm_arm.s
asm_freebsd_arm.s
asm_linux_arm.s
asm_nacl_arm.s
asm_netbsd_arm.s
atomic_linux_arm_test.go
atomic_test.go
doc.go
export_linux_arm_test.go
norace.go sync/atomic: add Value 2014-09-16 19:54:26 -07:00
race.go sync/atomic: add Value 2014-09-16 19:54:26 -07:00
race.s
value_test.go sync/atomic: add Value 2014-09-16 19:54:26 -07:00
value.go sync/atomic: add Value 2014-09-16 19:54:26 -07:00