sync: add example for Pool
It was a little tricky to figure out how to go from the documentation to figuring out the best way to implement a Pool, so I thought I'd try to provide a simple example. The implementation is mostly taken from the fmt package. I'm not happy with the verbosity of the calls to WriteString() etc, but I wanted to provide a non-trivial example. Change-Id: Id33a8b6cbf8eb278f71e1f78e20205b436578606 Reviewed-on: https://go-review.googlesource.com/24371Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please register or sign in to comment