()
| 83 | } |
| 84 | |
| 85 | func (this *eventWorker) Run() { |
| 86 | for { |
| 87 | select { |
| 88 | case _ = <-this.ticker.C: |
| 89 | if this.tickerCount > MAX_TICKER_COUNT { |
| 90 | this.Close() |
| 91 | return |
| 92 | } |
| 93 | this.tickerCount++ |
| 94 | case e := <-this.incoming: |
| 95 | // reset tickerCount |
| 96 | this.tickerCount = 0 |
| 97 | this.parserEvent(e) |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | func (this *eventWorker) Close() { |
| 103 | // 即将关闭, 必须输出结果 |
no test coverage detected