mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
1.优化服务配置检查
2.废弃SetGoRoutineNum接口 3.释放Module优化
This commit is contained in:
@@ -264,10 +264,13 @@ func (s *Service) Release() {
|
||||
}
|
||||
}()
|
||||
|
||||
for i:=len(s.child)-1; i>=0; i-- {
|
||||
s.ReleaseModule(s.child[i].GetModuleId())
|
||||
}
|
||||
|
||||
if atomic.AddInt32(&s.isRelease, -1) == -1 {
|
||||
s.self.OnRelease()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (s *Service) OnRelease() {
|
||||
@@ -432,6 +435,7 @@ func (s *Service) SetEventChannelNum(num int) {
|
||||
}
|
||||
}
|
||||
|
||||
// Deprecated: replace it with the OpenConcurrent function
|
||||
func (s *Service) SetGoRoutineNum(goroutineNum int32) bool {
|
||||
//已经开始状态不允许修改协程数量,打开性能分析器不允许开多线程
|
||||
if s.startStatus == true || s.profiler != nil {
|
||||
|
||||
Reference in New Issue
Block a user