Commit 38dcc8cd authored by Blake Gentry's avatar Blake Gentry Committed by Brad Fitzpatrick

net/http: remove unused switchReader type

Change-Id: Ic8a01d06ffc6c80beaf6dee9e7242dcbb7425e71
Reviewed-on: https://go-review.googlesource.com/3822Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 5ae67e1e
......@@ -191,20 +191,14 @@ func (c *conn) noteClientGone() {
c.clientGone = true
}
// A switchReader can have its Reader changed at runtime.
// It's not safe for concurrent Reads and switches.
type switchReader struct {
io.Reader
}
// A switchWriter can have its Writer changed at runtime.
// It's not safe for concurrent Writes and switches.
type switchWriter struct {
io.Writer
}
// A liveSwitchReader is a switchReader that's safe for concurrent
// reads and switches, if its mutex is held.
// A liveSwitchReader can have its Reader changed at runtime. It's
// safe for concurrent reads and switches, if its mutex is held.
type liveSwitchReader struct {
sync.Mutex
r io.Reader
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment