MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / Read

Method Read

pkg/wshutil/wshcmdreader.go:159–173  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

157}
158
159func (b *PtyBuffer) Read(p []byte) (n int, err error) {
160 b.CVar.L.Lock()
161 defer b.CVar.L.Unlock()
162 for b.DataBuf.Len() == 0 {
163 if b.Err != nil {
164 return 0, b.Err
165 }
166 if b.AtEOF {
167 return 0, io.EOF
168 }
169 b.CVar.Wait()
170 }
171 b.CVar.Broadcast()
172 return b.DataBuf.Read(p)
173}

Callers 2

runMethod · 0.45
determineMimeTypeFunction · 0.45

Calls 2

LenMethod · 0.80
WaitMethod · 0.65

Tested by

no test coverage detected