mirror of https://github.com/golang/go.git
When setting metadata, we must invalidate any packages that have been computed with old metadata. Also make setMetadata atomic, by locking around it in Load. This is just writing memory after a Load, so should be fast and infrequent. It is critical that our various maps related to metadata are coherent, so it makes sense to err on the side of coarser locking, IMO. Fix a race in TestUpgradeCodeLens. Change-Id: Iee8003b7e52b9f21681bdba08a009824f4ac6268 Reviewed-on: https://go-review.googlesource.com/c/tools/+/331809 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
|---|---|---|
| .. | ||
| codelens_test.go | ||