]> Cypherpunks.ru repositories - gostls13.git/commit
sync: document RWMutex race semantics
authorMichael Pratt <mpratt@google.com>
Tue, 17 Nov 2020 21:47:08 +0000 (16:47 -0500)
committerMichael Pratt <mpratt@google.com>
Wed, 18 Nov 2020 20:12:03 +0000 (20:12 +0000)
commitb4f3d52f6a90aa520799f836e5951d5cf65f7fe4
treece96a7325b6798166b2af41cedb37a51c3aaed80
parentb63db7f72446753de0f5bb78b629dbe58fb15cda
sync: document RWMutex race semantics

RWMutex provides explicit acquire/release synchronization events to the
race detector to model the mutex. It disables sync events within the
methods to avoid e.g., the atomics from adding false synchronization
events, which could cause false negatives in the race detector.

Change-Id: I5126ce2efaab151811ac264864aab1fa025a4aaf
Reviewed-on: https://go-review.googlesource.com/c/go/+/270865
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Trust: Michael Pratt <mpratt@google.com>
src/sync/rwmutex.go