pool

package
v0.0.0-...-bd135c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultPool = New(1024)

Functions

func Get

func Get() *ringbuffer.RingBuffer

Get:获取元素

func Put

func Put(r *ringbuffer.RingBuffer)

Put:存放元素

Types

type RingBufferPool

type RingBufferPool struct {
	// contains filtered or unexported fields
}

RingBufferPool:定义 RingBufferPool 结构体

func New

func New(initSize int) *RingBufferPool

New:根据初始化大小 initSize,初始化一个 RingBufferPool

func (*RingBufferPool) Get

func (*RingBufferPool) Put

Put:存放元素

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL