Dispose will dispose of the batcher. Any calls to Put or Flush will return ErrDisposed, calls to Get will return an error iff there are no more ready batches.
b.Put("f") b.Dispose() _, err = b.Get()
assert.Nil(err) assert.False(b.IsDisposed()) b.Dispose() assert.True(b.IsDisposed()) }
Dispose is referenced in 1 repositorygithub.com/Workiva/go-datastructures
- 2 references in batcher/batcher_test.go