]> Cypherpunks repositories - gostls13.git/commit
bufio: make Writer.ReadFrom not flush prematurely. For example,
authorNigel Tao <nigeltao@golang.org>
Fri, 19 Oct 2012 05:32:00 +0000 (16:32 +1100)
committerNigel Tao <nigeltao@golang.org>
Fri, 19 Oct 2012 05:32:00 +0000 (16:32 +1100)
commite55fdff21030e4925086af90fa669b3e378f2dfc
tree04bda1e53b8c3de64ecc42415b492ca3d37780be
parent2a4818dd11a4fac1016b1ef2c2200a8e094272bd
bufio: make Writer.ReadFrom not flush prematurely. For example,
many small writes to a network may be less efficient that a few
large writes.

This fixes net/http's TestClientWrites, broken by 6565056 that
introduced Writer.ReadFrom. That test implicitly assumed that
calling io.Copy on a *bufio.Writer wouldn't write to the
underlying network until the buffer was full.

R=dsymonds
CC=bradfitz, golang-dev, mchaten, mikioh.mikioh
https://golang.org/cl/6743044
src/pkg/bufio/bufio.go
src/pkg/bufio/bufio_test.go