MCPcopy
hub / github.com/rclone/rclone / Put

Method Put

lib/pool/pool.go:313–320  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

311// Note that if you try to return a buffer of the wrong size to Put it
312// will panic.
313func (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//

Callers

nothing calls this directly

Calls 5

_putMethod · 0.95
updateMinFillMethod · 0.95
kickFlusherMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected