// Close pool, and free any resources associated with it.
Close pool, and free any resources associated with it.
// Close pool and free any resources associated with it .
func (pool *ObjectPool) Close() {
	if pool.IsClosed() {
		return
	}
	pool.closeLock.Lock()
	defer pool.closeLock.Unlock()
	if pool.closed {
		return
	}
	pool.startEvictor(-1)
	pool.closed = true
	pool.Clear()
	pool.idleObjects.InterruptTakeWaiters()
}
func ( pool * ObjectPool ) Close ( ) { if pool . IsClosed ( ) { return } pool . closeLock . Lock ( ) defer pool . closeLock . Unlock ( ) if pool . closed { return } pool . startEvictor ( - 1 ) pool . closed = true pool . Clear ( ) pool . idleObjects . InterruptTakeWaiters ( ) }
Close pool, and free any resources associated with it.
Close pool and free any resources associated with it .
// Stop the evictor before the pool is closed since evict() calls // assertOpen() // This clear removes any idle objects // Release any goroutines that were waiting for an object