diff options
author | panchenglong01 <1004907659@qq.com> | 2021-04-08 09:21:05 +0000 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2021-04-08 14:08:29 +0000 |
commit | 1749f3915e55b473bcc281095f41598357d6b70f (patch) | |
tree | 24c3d7b5d11425e180a643ef55bd200654207215 /src/sync | |
parent | a7e16abb22f1b249d2691b32a5d20206282898f2 (diff) | |
download | go-1749f3915e55b473bcc281095f41598357d6b70f.tar.gz go-1749f3915e55b473bcc281095f41598357d6b70f.zip |
sync: update misleading comment in map.go about entry type
As discussed in: https://github.com/golang/go/issues/45429, about entry
type comments, it is possible for p == nil when m.dirty != nil, so
update the commemt about it.
Fixes #45429
Change-Id: I7ef96ee5b6948df9ac736481d177a59ab66d7d4d
GitHub-Last-Rev: 202c598a0ab98f4634cb56fe2486e8e82f9d991f
GitHub-Pull-Request: golang/go#45443
Reviewed-on: https://go-review.googlesource.com/c/go/+/308292
Reviewed-by: Changkun Ou <euryugasaki@gmail.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Trust: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/sync')
-rw-r--r-- | src/sync/map.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sync/map.go b/src/sync/map.go index 9ad25353ff..dfb62dd3e8 100644 --- a/src/sync/map.go +++ b/src/sync/map.go @@ -73,7 +73,8 @@ var expunged = unsafe.Pointer(new(interface{})) type entry struct { // p points to the interface{} value stored for the entry. // - // If p == nil, the entry has been deleted and m.dirty == nil. + // If p == nil, the entry has been deleted, and either m.dirty == nil or + // m.dirty[key] is e. // // If p == expunged, the entry has been deleted, m.dirty != nil, and the entry // is missing from m.dirty. |