From 9c4ec3fe31c18f3528555c9b8a9ca6371c125c99 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Fri, 6 Jul 2018 20:44:10 +0800 Subject: [PATCH] optimization --- pool_func.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pool_func.go b/pool_func.go index 52e3515..cfcbba5 100644 --- a/pool_func.go +++ b/pool_func.go @@ -62,7 +62,7 @@ type PoolWithFunc struct { once sync.Once } -func (p *PoolWithFunc) MonitorAndClear() { +func (p *PoolWithFunc) monitorAndClear() { go func() { for { time.Sleep(p.expiryDuration)