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

Method enter

writer.go:524–532  ·  view source on GitHub ↗

enter is called by WriteMessages to indicate that a new inflight operation has started, which helps synchronize with Close and ensure that the method does not return until all inflight operations were completed.

()

Source from the content-addressed store, hash-verified

522// has started, which helps synchronize with Close and ensure that the method
523// does not return until all inflight operations were completed.
524func (w *Writer) enter() bool {
525 w.mutex.Lock()
526 defer w.mutex.Unlock()
527 if w.closed {
528 return false
529 }
530 w.group.Add(1)
531 return true
532}
533
534// leave is called by WriteMessages to indicate that the inflight operation has
535// completed.

Callers 1

WriteMessagesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected