mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-23 23:30:25 +08:00
优化系统goroutine使用,减少goroutine数量,增加goman查看goroutine数量指令
This commit is contained in:
@@ -2,6 +2,7 @@ package nodes
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/goman"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/remotelogs"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/rpc"
|
||||
"reflect"
|
||||
@@ -26,7 +27,9 @@ func NewHTTPAccessLogQueue() *HTTPAccessLogQueue {
|
||||
queue := &HTTPAccessLogQueue{
|
||||
queue: make(chan *pb.HTTPAccessLog, maxSize),
|
||||
}
|
||||
go queue.Start()
|
||||
goman.New(func() {
|
||||
queue.Start()
|
||||
})
|
||||
|
||||
return queue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user