, 2019 at 8:00:45 PM UTC, robert engels wrote:
>
> What exactly do you think is wrong with the code? putBufioReader() is
> called in several locations to place the reader into the Pool for later
> retrieval by newBufioReader() ???
>
> On Feb 18, 2019, at 8:30 AM, Matija Martinić &
Poking around the golang's net/http I came across this thing.
var (
bufioReaderPool sync.Pool
bufioWriter2kPool sync.Pool
bufioWriter4kPool sync.Pool
)
...
func newBufioReader(r io.Reader) *bufio.Reader {
if v := bufioReaderPool.Get(); v != nil {
br := v.(*bufio.Reader)
br.Reset(r)
retu