You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
jolestar edited this page Jan 18, 2016
·
2 revisions
How to config pool schedule check pooled object is active at background? I do not want check on borrow or return?
//set pool TimeBetweenEvictionRunsMillis to schedule peroid, eg: 3000 millisecond
pool.Config.TimeBetweenEvictionRunsMillis = 3000
pool.Config.TestWhileIdle = true
//restart evector goroutine to let TimeBetweenEvictionRunsMillis change take effect.
pool.StartEvictor()