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> |
||
|---|---|---|
| .. | ||
| analysisinternal | ||
| apidiff | ||
| event | ||
| fakenet | ||
| fastwalk | ||
| gocommand | ||
| gopathwalk | ||
| imports | ||
| jsonrpc2 | ||
| jsonrpc2_v2 | ||
| lsp | ||
| memoize | ||
| packagesinternal | ||
| proxydir | ||
| span | ||
| stack | ||
| testenv | ||
| tool | ||
| typeparams | ||
| typesinternal | ||
| xcontext | ||