()
| 113 | pool.Close() |
| 114 | } |
| 115 | func (pool *CheckPool) Close() { |
| 116 | pool.Cancel() |
| 117 | pool.waitWorkers() |
| 118 | close(pool.processCh) |
| 119 | <-pool.handlerDone |
| 120 | if pool.Bar != nil { |
| 121 | pool.Bar.Close() |
| 122 | } |
| 123 | if pool.Pool != nil { |
| 124 | pool.Pool.Release() |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | func (pool *CheckPool) waitWorkers() { |
| 129 | done := make(chan struct{}) |