• Dave Cheney's avatar
    net: fix data races on deadline vars · 9fb96991
    Dave Cheney authored
    Fixes #4434.
    
    This proposal replaces the previous CL 6855110. Due to issue 599, 64-bit atomic operations should probably be avoided, so use a sync.Mutex instead.
    
    Benchmark comparisons against 025b9d070a85 on linux/386:
    
    CL 6855110:
    
    benchmark                        old ns/op    new ns/op    delta
    BenchmarkTCPOneShot                 710024       727409   +2.45%
    BenchmarkTCPOneShotTimeout          758178       768620   +1.38%
    BenchmarkTCPPersistent              223464       228058   +2.06%
    BenchmarkTCPPersistentTimeout       234494       242600   +3.46%
    
    This proposal:
    
    benchmark                        old ns/op    new ns/op    delta
    BenchmarkTCPOneShot                 710024       718492   +1.19%
    BenchmarkTCPOneShotTimeout          758178       748783   -1.24%
    BenchmarkTCPPersistent              223464       227628   +1.86%
    BenchmarkTCPPersistentTimeout       234494       238321   +1.63%
    
    R=rsc, dvyukov, mikioh.mikioh, alex.brainman, bradfitz
    CC=golang-dev, remyoudompheng
    https://golang.org/cl/6866050
    9fb96991
Name
Last commit
Last update
..
archive Loading commit data...
bufio Loading commit data...
builtin Loading commit data...
bytes Loading commit data...
compress Loading commit data...
container Loading commit data...
crypto Loading commit data...
database/sql Loading commit data...
debug Loading commit data...
encoding Loading commit data...
errors Loading commit data...
exp Loading commit data...
expvar Loading commit data...
flag Loading commit data...
fmt Loading commit data...
go Loading commit data...
hash Loading commit data...
html Loading commit data...
image Loading commit data...
index/suffixarray Loading commit data...
io Loading commit data...
log Loading commit data...
math Loading commit data...
mime Loading commit data...
net Loading commit data...
old/netchan Loading commit data...
os Loading commit data...
path Loading commit data...
reflect Loading commit data...
regexp Loading commit data...
runtime Loading commit data...
sort Loading commit data...
strconv Loading commit data...
strings Loading commit data...
sync Loading commit data...
syscall Loading commit data...
testing Loading commit data...
text Loading commit data...
time Loading commit data...
unicode Loading commit data...
unsafe Loading commit data...