From 3edeea2574034afc4d3682c29e3996f53ecf83aa Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Wed, 26 Dec 2018 13:05:03 -0600 Subject: [PATCH] Remove min size Pruning pool functionality --- pool.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pool.go b/pool.go index dd04126..1db90f6 100644 --- a/pool.go +++ b/pool.go @@ -63,7 +63,6 @@ type Pool struct { allResources []*Resource availableResources []*Resource - minSize int maxSize int closed bool @@ -108,25 +107,6 @@ func (p *Pool) Size() int { return n } -// MinSize returns the current minimum size of the pool. -func (p *Pool) MinSize() int { - p.cond.L.Lock() - n := p.minSize - p.cond.L.Unlock() - return n -} - -// SetMinSize sets the minimum size of the pool. It panics if n < 0. -func (p *Pool) SetMinSize(n int) { - if n < 0 { - panic("pool MinSize cannot be < 0") - } - p.cond.L.Lock() - p.minSize = n - - p.cond.L.Unlock() -} - // MaxSize returns the current maximum size of the pool. func (p *Pool) MaxSize() int { p.cond.L.Lock()