Try to abstract the main part.
This commit is contained in:
2
code/tool/cache/cache.go
vendored
2
code/tool/cache/cache.go
vendored
@ -197,7 +197,7 @@ func (table *Table) checkExpire() {
|
||||
table.cleanupInterval = smallestDuration
|
||||
if smallestDuration > 0 {
|
||||
table.cleanupTimer = time.AfterFunc(smallestDuration, func() {
|
||||
go util.SafeMethod(table.checkExpire)
|
||||
go util.RunWithRecovery(table.checkExpire)
|
||||
})
|
||||
}
|
||||
table.Unlock()
|
||||
|
Reference in New Issue
Block a user