forked from mirror/ants
format codes
This commit is contained in:
parent
b21f63142d
commit
afba560448
2
pool.go
2
pool.go
|
@ -96,7 +96,7 @@ func NewPool(size, expiry int) (*Pool, error) {
|
|||
capacity: int32(size),
|
||||
freeSignal: make(chan sig, math.MaxInt32),
|
||||
release: make(chan sig, 1),
|
||||
expiryDuration: time.Duration(expiry)*time.Second,
|
||||
expiryDuration: time.Duration(expiry) * time.Second,
|
||||
}
|
||||
p.monitorAndClear()
|
||||
return p, nil
|
||||
|
|
|
@ -96,7 +96,7 @@ func NewPoolWithFunc(size, expiry int, f pf) (*PoolWithFunc, error) {
|
|||
capacity: int32(size),
|
||||
freeSignal: make(chan sig, math.MaxInt32),
|
||||
release: make(chan sig, 1),
|
||||
expiryDuration: time.Duration(expiry)*time.Second,
|
||||
expiryDuration: time.Duration(expiry) * time.Second,
|
||||
poolFunc: f,
|
||||
}
|
||||
p.MonitorAndClear()
|
||||
|
|
Loading…
Reference in New Issue