Skip to content

Instantly share code, notes, and snippets.

@yosssi
Created December 16, 2014 14:10
Show Gist options
  • Save yosssi/9d586438b40ad2b557ce to your computer and use it in GitHub Desktop.
Save yosssi/9d586438b40ad2b557ce to your computer and use it in GitHub Desktop.
Go 1.4 source code using "sync.Pool"
$ ag "sync.Pool" | grep .go
archive/zip/register.go:25:var flateWriterPool sync.Pool
encoding/json/encode.go:247:var encodeStatePool sync.Pool
fmt/print.go:127:var ppFree = sync.Pool{
fmt/scan.go:384:var ssFree = sync.Pool{
io/ioutil/ioutil.go:140:var blackHolePool = sync.Pool{
net/http/header.go:120:var headerSorterPool = sync.Pool{
net/http/request.go:574:var textprotoReaderPool sync.Pool
net/http/server.go:450:	bufioReaderPool   sync.Pool
net/http/server.go:451:	bufioWriter2kPool sync.Pool
net/http/server.go:452:	bufioWriter4kPool sync.Pool
net/http/server.go:455:func bufioWriterPool(size int) *sync.Pool {
runtime/mgc0.go:41:	// clear sync.Pools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment