mirror of
https://github.com/golang/go
synced 2024-11-06 07:26:10 -07:00
d42a48828f
Cond is difficult to use correctly (I was just bitten by it in a production app that I inherited). While several proposals have come up to improve or remove sync.Cond, no action has so far been taken. Update the documentation to discourage use of sync.Cond, and point people in the direction of preferred alternatives. I believe this will help encourage behavior we want (less use of sync.Cond and more use of channels), while also paving the way for, potentially, removing Cond in a future version of the language. Thanks very much to Bryan Mills and Sean Liao for discussion and recommendations. Updates #20491. Updates #21165. Change-Id: Ib4d0631c79d4c4d0a30027255cd43bc47cddebd3 Reviewed-on: https://go-review.googlesource.com/c/go/+/412237 Run-TryBot: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> |
||
---|---|---|
.. | ||
atomic | ||
cond_test.go | ||
cond.go | ||
example_pool_test.go | ||
example_test.go | ||
export_test.go | ||
map_bench_test.go | ||
map_reference_test.go | ||
map_test.go | ||
map.go | ||
mutex_test.go | ||
mutex.go | ||
once_test.go | ||
once.go | ||
pool_test.go | ||
pool.go | ||
poolqueue.go | ||
runtime2_lockrank.go | ||
runtime2.go | ||
runtime_sema_test.go | ||
runtime.go | ||
rwmutex_test.go | ||
rwmutex.go | ||
waitgroup_test.go | ||
waitgroup.go |