MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / NewWriterPool

Function NewWriterPool

internal/compressions/writer_pool.go:40–49  ·  view source on GitHub ↗
(maxSize int, newFunc func(writer io.Writer, level int) (Writer, error))

Source from the content-addressed store, hash-verified

38}
39
40func NewWriterPool(maxSize int, newFunc func(writer io.Writer, level int) (Writer, error)) *WriterPool {
41 if maxSize <= 0 {
42 maxSize = 1024
43 }
44
45 return &WriterPool{
46 c: make(chan Writer, maxSize),
47 newFunc: newFunc,
48 }
49}
50
51func (this *WriterPool) Get(parentWriter io.Writer, level int) (Writer, error) {
52 if isBusy {

Callers 4

initFunction · 0.85
initFunction · 0.85
initFunction · 0.85
initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected