Goroutines are pooled over $GOMAXPROCS system threads by the runtime
(for the native compiler chain). Gccgo still currently has a 1:1
goroutine:thread ratio, but this is intended to change Sometime
Soon(tm).
Heavy thread pool use in Java happens because it is very expensive to
create Java threads, so we use FutureTasks instead and pool those. It
is comparatively very inexpensive to create goroutines.
For these reasons, I would posit that thread pooling is not something
you should worry about.
--dho
Usually you will create pool of objects instead of pool of threads.
See the Leaky Buffer sample:
http://golang.org/doc/effective_go.html#leaky_buffer
Here you define a pool of buffers, so when you need a new buffer to
store bytes you just request one from the channel, and when you finish
using it just put back on the channel.
--
André Moraes
http://andredevchannel.blogspot.com/