2
0

Remove min size

Pruning pool functionality
This commit is contained in:
Jack Christensen
2018-12-26 13:05:03 -06:00
parent 7df4afe7d3
commit 3edeea2574
-20
View File
@@ -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()