| 212 | } |
| 213 | |
| 214 | func (this *module) do_close(wait *sync.WaitGroup) { |
| 215 | for _, c := range this.component_map { |
| 216 | c.Close() |
| 217 | } |
| 218 | for _, a := range this.agent_map { |
| 219 | a.Close() |
| 220 | } |
| 221 | if PerfomancePrint == true { |
| 222 | elasp_time := time.Now().UnixNano()/1e9 - this.begin_time |
| 223 | slog.LogError("perfomance", "module perfomance [%s] %d %d %d", this.name, elasp_time, this.op_count, this.op_count/elasp_time) |
| 224 | } |
| 225 | //slog.LogWarning("module", "module [%s] closed!", this.name) |
| 226 | } |
| 227 | |
| 228 | func (this *module) handle_event(event_msg EventMsg) { |
| 229 | switch event_msg.GetType() { |