Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Bytes = New(32, 64*(1<<10))
View Source
var TinyBytes = New(4, 128)
Functions ¶
func AcquireWaitGroup ¶
func ReleaseTimer ¶
func ReleaseWaitGroup ¶
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool contains logic of reusing objects distinguishable by size in generic way.
func New ¶
New creates new Pool that reuses objects which size is in logarithmic range [min, max].
Note that it is a shortcut for Custom() constructor with Options provided by WithLogSizeMapping() and WithLogSizeRange(min, max) calls.
func (*Pool) Get ¶
Get returns probably reused slice of bytes with at least capacity of c and exactly len of n.
Click to show internal directories.
Click to hide internal directories.