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

Function MakeCirBuf

pkg/jobmanager/cirbuf.go:23–31  ·  view source on GitHub ↗
(maxSize int, initSyncMode bool)

Source from the content-addressed store, hash-verified

21}
22
23func MakeCirBuf(maxSize int, initSyncMode bool) *CirBuf {
24 cb := &CirBuf{
25 buf: make([]byte, maxSize),
26 syncMode: initSyncMode,
27 waiterChan: make(chan chan struct{}, 1),
28 windowSize: maxSize,
29 }
30 return cb
31}
32
33// SetEffectiveWindow changes the sync mode and effective window size for flow control.
34// The windowSize is capped at the buffer size.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected