You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is no reason to diagnose on a detached context. If the snapshot
background context is cancelled, it is either because the view is shut
down (and so we don't care about the results) or a subsequent snapshot
has been created. In the latter case, any results that may be published
using the detached context could be inaccurate, and we must overwrite
them with the later snapshot anyway.
Instead, use the diagnoseSnapshot helper, which runs on the snapshot
background context. In order to avoid unnecessary delay, lift the delay
value used in this method to the callsites. This should also speed up
go.mod related custom commands that were unnecessarily incurring the
delay.
Change-Id: I648e9ebcffb027efc76b74ca38354b9ad99da6e7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/487137
gopls-CI: kokoro <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Robert Findley <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
0 commit comments