(writer *gzip.Writer)
| 47 | } |
| 48 | |
| 49 | func (this *GzipWriterPool) Put(writer *gzip.Writer) { |
| 50 | select { |
| 51 | case this.getC() <- writer: |
| 52 | default: |
| 53 | // 不需要close,因为已经在使用的时候调用了 |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | func (this *GzipWriterPool) getC() chan *gzip.Writer { |
| 58 | var procId = percpu.GetProcId() |
no test coverage detected