MCPcopy
hub / github.com/kubernetes/client-go / takeBatch

Method takeBatch

tools/watch/informerwatcher.go:59–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57}
58
59func (e *eventProcessor) takeBatch() []watch.Event {
60 e.cond.L.Lock()
61 defer e.cond.L.Unlock()
62
63 for len(e.buff) == 0 && !e.stopped() {
64 e.cond.Wait()
65 }
66
67 batch := e.buff
68 e.buff = nil
69 return batch
70}
71
72func (e *eventProcessor) writeBatch(events []watch.Event) {
73 for _, event := range events {

Callers 1

runMethod · 0.95

Calls 1

stoppedMethod · 0.95

Tested by

no test coverage detected