pool: fix typo
This commit is contained in:
parent
550341c036
commit
eb1affd5da
@ -26,7 +26,7 @@ type ReadBuffer struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewReadBuffer returns a freshly instantiated ReadBuffer, using the given
|
// NewReadBuffer returns a freshly instantiated ReadBuffer, using the given
|
||||||
// gcInterval and expieryInterval.
|
// gcInterval and expiryInterval.
|
||||||
func NewReadBuffer(gcInterval, expiryInterval time.Duration) *ReadBuffer {
|
func NewReadBuffer(gcInterval, expiryInterval time.Duration) *ReadBuffer {
|
||||||
return &ReadBuffer{
|
return &ReadBuffer{
|
||||||
pool: NewRecycle(
|
pool: NewRecycle(
|
||||||
|
@ -86,7 +86,7 @@ func (w *Write) newWorkerState() WorkerState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Cleanup returns the writeBuf to the underlying buffer pool, and removes the
|
// Cleanup returns the writeBuf to the underlying buffer pool, and removes the
|
||||||
// goroutine's reference to the readBuf and encapsulating buf.
|
// goroutine's reference to the writeBuf and encapsulating buf.
|
||||||
func (w *writeWorkerState) Cleanup() {
|
func (w *writeWorkerState) Cleanup() {
|
||||||
w.bufferPool.Return(w.writeBuf)
|
w.bufferPool.Return(w.writeBuf)
|
||||||
w.writeBuf = nil
|
w.writeBuf = nil
|
||||||
|
@ -13,7 +13,7 @@ const (
|
|||||||
DefaultWriteBufferGCInterval = 15 * time.Second
|
DefaultWriteBufferGCInterval = 15 * time.Second
|
||||||
|
|
||||||
// DefaultWriteBufferExpiryInterval is the default, minimum interval
|
// DefaultWriteBufferExpiryInterval is the default, minimum interval
|
||||||
// that must elapse before a Write will release a buffer.Write. The
|
// that must elapse before a Write will release a buffer.Write. The
|
||||||
// maximum time before the buffer can be released is equal to the expiry
|
// maximum time before the buffer can be released is equal to the expiry
|
||||||
// interval plus the gc interval.
|
// interval plus the gc interval.
|
||||||
DefaultWriteBufferExpiryInterval = 30 * time.Second
|
DefaultWriteBufferExpiryInterval = 30 * time.Second
|
||||||
|
Loading…
Reference in New Issue
Block a user