MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / newBlockingReader

Function newBlockingReader

asyncbuffer/buffer_test.go:75–81  ·  view source on GitHub ↗

newBlockingReader creates a new partialReader in locked state

(reader io.ReadCloser)

Source from the content-addressed store, hash-verified

73
74// newBlockingReader creates a new partialReader in locked state
75func newBlockingReader(reader io.ReadCloser) *blockingReader {
76 r := &blockingReader{
77 reader: reader,
78 }
79 r.mu.Lock()
80 return r
81}
82
83// Read reads data from the testReader, simulating a slow read and a potential failure
84func (r *blockingReader) Read(p []byte) (n int, err error) {

Callers 1

TestAsyncBufferReadAsyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected