优化系统goroutine使用,减少goroutine数量,增加goman查看goroutine数量指令

This commit is contained in:
GoEdgeLab
2021-12-08 15:17:45 +08:00
parent 7a2bfda436
commit 54bf0ab39d
48 changed files with 469 additions and 146 deletions

View File

@@ -3,6 +3,7 @@ package nodes
import (
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
"github.com/TeaOSLab/EdgeNode/internal/events"
"github.com/TeaOSLab/EdgeNode/internal/goman"
"github.com/TeaOSLab/EdgeNode/internal/remotelogs"
"github.com/iwind/TeaGo/Tea"
"net"
@@ -67,7 +68,9 @@ func (this *TOAManager) Run(config *nodeconfigs.TOAConfig) error {
}
this.pid = cmd.Process.Pid
go func() { _ = cmd.Wait() }()
goman.New(func() {
_ = cmd.Wait()
})
return nil
}