Pool manages a set of resources that can be shared safely by multiple goroutines. The resource being managed must implement the io.Closer interface.
| 13 | // multiple goroutines. The resource being managed must implement |
| 14 | // the io.Closer interface. |
| 15 | type Pool struct { |
| 16 | m sync.Mutex |
| 17 | resources chan io.Closer |
| 18 | factory func() (io.Closer, error) |
| 19 | closed bool |
| 20 | } |
| 21 | |
| 22 | // ErrPoolClosed is returned when an Acquire returns on a |
| 23 | // closed pool. |
nothing calls this directly
no outgoing calls
no test coverage detected