Put returns the buffer to the buffer cache or frees it Note that if you try to return a buffer of the wrong size to Put it will panic.
(buf []byte)
| 311 | // Note that if you try to return a buffer of the wrong size to Put it |
| 312 | // will panic. |
| 313 | func (bp *Pool) Put(buf []byte) { |
| 314 | bp.mu.Lock() |
| 315 | defer bp.mu.Unlock() |
| 316 | bp._put(buf) |
| 317 | bp.inUse-- |
| 318 | bp.updateMinFill() |
| 319 | bp.kickFlusher() |
| 320 | } |
| 321 | |
| 322 | // PutN returns the buffers to the buffer cache or frees it, |
| 323 | // |
nothing calls this directly
no test coverage detected