mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 03:07:45 +08:00
Not Callback ExpireFunc In Pool.Get()
This commit is contained in:
parent
57a82ebcc0
commit
80c4786afd
@ -114,6 +114,8 @@ func (p *Pool) Get() (interface{}, error) {
|
||||
f := r.(*poolItem)
|
||||
if f.expire == 0 || f.expire > gtime.TimestampMilli() {
|
||||
return f.value, nil
|
||||
} else if p.ExpireFunc != nil {
|
||||
p.ExpireFunc(f.value)
|
||||
}
|
||||
} else {
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user