mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-16 18:11:03 +00:00
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…
x
Reference in New Issue
Block a user