mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-02-07 09:55:36 +08:00
优化系统goroutine使用,减少goroutine数量,增加goman查看goroutine数量指令
This commit is contained in:
@@ -29,11 +29,9 @@ func NewIPList() *IPList {
|
||||
}
|
||||
|
||||
expireList := expires.NewList()
|
||||
go func() {
|
||||
expireList.StartGC(func(itemId int64) {
|
||||
list.Delete(itemId)
|
||||
})
|
||||
}()
|
||||
expireList.OnGC(func(itemId int64) {
|
||||
list.Delete(itemId)
|
||||
})
|
||||
list.expireList = expireList
|
||||
return list
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user