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

Method handleReadData

pkg/jobmanager/streammanager.go:308–324  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

306}
307
308func (sm *StreamManager) handleReadData(data []byte) {
309 offset := 0
310 for offset < len(data) {
311 n, waitCh := sm.buf.WriteAvailable(data[offset:])
312 offset += n
313
314 if n > 0 {
315 sm.lock.Lock()
316 sm.drainCond.Signal()
317 sm.lock.Unlock()
318 }
319
320 if waitCh != nil {
321 <-waitCh
322 }
323 }
324}
325
326func (sm *StreamManager) handleEOF() {
327 sm.lock.Lock()

Callers 1

readLoopMethod · 0.95

Calls 1

WriteAvailableMethod · 0.80

Tested by

no test coverage detected