mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-30 04:10:25 +08:00
优化代码
This commit is contained in:
@@ -22,13 +22,15 @@ const (
|
|||||||
maxMemoryFragmentPoolItemAgeSeconds = 60
|
maxMemoryFragmentPoolItemAgeSeconds = 60
|
||||||
)
|
)
|
||||||
|
|
||||||
var SharedFragmentMemoryPool = NewMemoryFragmentPool()
|
var SharedFragmentMemoryPool *MemoryFragmentPool
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
if !teaconst.IsMain {
|
if !teaconst.IsMain {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SharedFragmentMemoryPool = NewMemoryFragmentPool()
|
||||||
|
|
||||||
goman.New(func() {
|
goman.New(func() {
|
||||||
var ticker = time.NewTicker(200 * time.Millisecond)
|
var ticker = time.NewTicker(200 * time.Millisecond)
|
||||||
for range ticker.C {
|
for range ticker.C {
|
||||||
|
|||||||
Reference in New Issue
Block a user