concurrent

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjPoll

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

对象池

func NewObjPoll

func NewObjPoll(obj PoolGenerateItem, num int) *ObjPoll

创建对象池

func (*ObjPoll) GetObj

func (p *ObjPoll) GetObj(timeout time.Duration) (interface{}, error)

获取对象

func (*ObjPoll) Release

func (p *ObjPoll) Release(obj interface{}) error

放回对象

type PoolGenerateItem

type PoolGenerateItem func() interface{}

Jump to

Keyboard shortcuts

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