MCPcopy
hub / github.com/segmentio/kafka-go / Get

Method Get

writer.go:948–965  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

946}
947
948func (b *batchQueue) Get() *writeBatch {
949 b.cond.L.Lock()
950 defer b.cond.L.Unlock()
951
952 for len(b.queue) == 0 && !b.closed {
953 b.cond.Wait()
954 }
955
956 if len(b.queue) == 0 {
957 return nil
958 }
959
960 batch := b.queue[0]
961 b.queue[0] = nil
962 b.queue = b.queue[1:]
963
964 return batch
965}
966
967func (b *batchQueue) Close() {
968 b.cond.L.Lock()

Callers 15

BalanceMethod · 0.80
BalanceMethod · 0.80
ecsAvailabilityZoneFunction · 0.80
ec2AvailabilityZoneFunction · 0.80
acquireBufferFunction · 0.80
writeBatchesMethod · 0.80
MarshalFunction · 0.80
newPageFunction · 0.80
newPageBufferFunction · 0.80
UnmarshalFunction · 0.80

Calls

no outgoing calls

Tested by 4

ecsAvailabilityZoneFunction · 0.64
ec2AvailabilityZoneFunction · 0.64