mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
使用sync.pool对象池优化Timer的GC压力
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/duanhf2012/origin/profiler"
|
||||
"github.com/duanhf2012/origin/rpc"
|
||||
"github.com/duanhf2012/origin/util/timer"
|
||||
"github.com/duanhf2012/origin/util/timewheel"
|
||||
"reflect"
|
||||
"runtime"
|
||||
"sync"
|
||||
@@ -147,6 +148,7 @@ func (slf *Service) Run() {
|
||||
analyzer.Pop()
|
||||
analyzer = nil
|
||||
}
|
||||
timewheel.ReleaseTimer(t)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user