diff options
| author | Eduard Urbach <e.urbach@gmail.com> | 2018-04-24 14:28:19 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-10-03 02:32:28 +0000 |
| commit | 8919fe9e4d00aec34cfb8e3a0e5c7f629c9e1fc5 (patch) | |
| tree | cdbb8b1709a5c1c9118187ba054d4bad91659788 /src/net/http | |
| parent | 06ff4772ab1731742c2b2fbf715231264ede7e34 (diff) | |
| download | go-8919fe9e4d00aec34cfb8e3a0e5c7f629c9e1fc5.tar.xz | |
net/http: explain more how Pusher.Push works
This will clarify that the resources are not completely pushed yet when `Push` returns and that it starts a separate goroutine. This might be implementation dependant but as I believe there is currently only one implementation it should be added to the documentation of the interface which most people will look up first.
Change-Id: Id151c5563fd0c4e611eb1d93b4f64bf747ddf6d4
GitHub-Last-Rev: 1f46eb9a081f4529abc04026589ffd463be579b3
GitHub-Pull-Request: golang/go#25025
Reviewed-on: https://go-review.googlesource.com/c/108939
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/net/http')
| -rw-r--r-- | src/net/http/http.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net/http/http.go b/src/net/http/http.go index ce0eceb1de..30d1a52b63 100644 --- a/src/net/http/http.go +++ b/src/net/http/http.go @@ -135,6 +135,10 @@ type Pusher interface { // data that may trigger a request for URL X. This avoids a race where the // client issues requests for X before receiving the PUSH_PROMISE for X. // + // Push will run in a separate goroutine making the order of arrival + // non-deterministic. Any required synchronization needs to be implemented + // by the caller. + // // Push returns ErrNotSupported if the client has disabled push or if push // is not supported on the underlying connection. Push(target string, opts *PushOptions) error |
