(maxSize int, initSyncMode bool)
| 21 | } |
| 22 | |
| 23 | func 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. |
no outgoing calls
no test coverage detected