Commit c4fd3f6f authored by Ferenc Szabo's avatar Ferenc Szabo Committed by Rob Pike
Browse files

doc: add note about missing lock in sample code

The sample code in 'Interfaces and methods' section contains a
data race. Handlers are served concurrently. The handler does write
and read operations; `go test -race` would fail (with concurrent
requests). Since the doc is frozen and the code remains less
cluttered without locks/atomic, don't change the sample code.

Change-Id: I654b324d2f0b7f48497822751907c7d39e2f0e3d
Reviewed-on: https://go-review.googlesource.com/c/go/+/239877


Reviewed-by: default avatarRob Pike <r@golang.org>
parent 8c521739
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment