mirror of https://github.com/golang/go.git
Use a detached Context for all progress notifications. In particular, using a detached Context for the window/workDoneProgress/create notification avoids races where the $/cancelRequest notification and create response cross paths, such that the client has created a progress dialog but the server thinks that starting progress failed. Also, as a matter of best practice don't store a context on the WorkDone type, despite the fact that this Context is detached. Instead, only close over a Context in the WorkDoneWriter, which requires a Context in order to function but which implements the io.Writer interface. The TestProgressBarErrors test should now pass reliably. Fixes golang/go#46930 Change-Id: I0d115ed3a62de97fe545c8dc0403e7bb55f6e481 Reviewed-on: https://go-review.googlesource.com/c/tools/+/409936 Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> |
||
|---|---|---|
| .. | ||
| analysis.go | ||
| cache.go | ||
| check.go | ||
| error_test.go | ||
| errors.go | ||
| imports.go | ||
| keys.go | ||
| load.go | ||
| metadata.go | ||
| mod.go | ||
| mod_tidy.go | ||
| os_darwin.go | ||
| os_windows.go | ||
| parse.go | ||
| parse_test.go | ||
| parsemode_go116.go | ||
| parsemode_go117.go | ||
| pkg.go | ||
| session.go | ||
| snapshot.go | ||
| symbols.go | ||
| view.go | ||
| view_test.go | ||
| workspace.go | ||
| workspace_test.go | ||