Skip to content

Commit 15b7d33

Browse files
batcher_improvements: updated documentation
1 parent 22be312 commit 15b7d33

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

batcher/batcher.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ type Batcher interface {
3434
// Flush forcibly completes the batch currently being built
3535
Flush() error
3636

37-
// Dispose will dispose of the batcher. Any calls to Put or Get
38-
// will return errors.
37+
// Dispose will dispose of the batcher. Any calls to Put or Flush
38+
// will return ErrDisposed, calls to Get will return an error iff
39+
// there are no more ready batches.
3940
Dispose()
4041

4142
// IsDisposed will determine if the batcher is disposed
@@ -145,8 +146,9 @@ func (b *basicBatcher) Flush() error {
145146
return nil
146147
}
147148

148-
// Dispose will dispose of the batcher. Any calls to Put or Get
149-
// will return errors.
149+
// Dispose will dispose of the batcher. Any calls to Put or Flush
150+
// will return ErrDisposed, calls to Get will return an error iff
151+
// there are no more ready batches.
150152
func (b *basicBatcher) Dispose() {
151153
b.lock.Lock()
152154
if b.disposed {

0 commit comments

Comments
 (0)