From 2edd26749296d00d9655185a6825be537e313586 Mon Sep 17 00:00:00 2001 From: boyce Date: Mon, 18 Feb 2019 13:53:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E6=94=BE=E7=A8=8B=E5=BA=8F=E9=80=80?= =?UTF-8?q?=E5=87=BA=E5=AD=97=E6=AE=B5=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/Service.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/service/Service.go b/service/Service.go index 760000c..58326d8 100644 --- a/service/Service.go +++ b/service/Service.go @@ -81,8 +81,8 @@ type BaseModule struct { ownerService IService tickTime int64 - exit chan bool - pwaitGroup *sync.WaitGroup + ExitChan chan bool + WaitGroup *sync.WaitGroup } func (slf *BaseService) GetServiceId() int { @@ -223,12 +223,12 @@ func (slf *BaseModule) InitModule(module IModule) error { func (slf *BaseModule) DynamicRun(module IModule) { module.InitModule(module) - module.RunModule(module, slf.exit, slf.pwaitGroup) + module.RunModule(module, slf.ExitChan, slf.WaitGroup) } func (slf *BaseModule) RunModule(module IModule, exit chan bool, pwaitGroup *sync.WaitGroup) error { - slf.exit = exit - slf.pwaitGroup = pwaitGroup + slf.ExitChan = exit + slf.WaitGroup = pwaitGroup //运行所有子模块 for _, subModule := range slf.mapModule { go subModule.RunModule(subModule, exit, pwaitGroup)