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

Method close

writer.go:1187–1199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1185}
1186
1187func (ptw *partitionWriter) close() {
1188 ptw.mutex.Lock()
1189 defer ptw.mutex.Unlock()
1190
1191 if ptw.currBatch != nil {
1192 batch := ptw.currBatch
1193 ptw.queue.Put(batch)
1194 ptw.currBatch = nil
1195 batch.trigger()
1196 }
1197
1198 ptw.queue.Close()
1199}
1200
1201type writeBatch struct {
1202 time time.Time

Callers 1

CloseMethod · 0.45

Calls 3

PutMethod · 0.80
triggerMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected