]> Cypherpunks repositories - gostls13.git/commit
sync: add Pool type
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 18 Dec 2013 19:08:34 +0000 (11:08 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 18 Dec 2013 19:08:34 +0000 (11:08 -0800)
commit8c6ef061e3c189e3ac90a451d5680aab9d142618
tree8d611bc96ec5cacacd62f05f1bf5b31b0bf14b13
parent6a23d82df1da085e43dc8c0267b15aacf60f82e5
sync: add Pool type

Adds the Pool type and docs, and use it in fmt.
This is a temporary implementation, until Dmitry
makes it fast.

Uses the API proposal from Russ in http://goo.gl/cCKeb2 but
adds an optional New field, as used in fmt and elsewhere.
Almost all callers want that.

Update #4720

R=golang-dev, rsc, cshapiro, iant, r, dvyukov, khr
CC=golang-dev
https://golang.org/cl/41860043
src/pkg/runtime/mgc0.c
src/pkg/sync/pool.go [new file with mode: 0644]
src/pkg/sync/pool_test.go [new file with mode: 0644]