fda_pool

package
v0.1.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjPool

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

func NewObjPool

func NewObjPool(numOfObj int) *ObjPool

func (*ObjPool) GetObj

func (p *ObjPool) GetObj(timeout time.Duration) (*ReusableObj, error)

func (p *ObjPool) GetObj(timeout time.Duration) (obj interface{}, error) { //可以放任何对象

func (*ObjPool) ReleaseObj

func (p *ObjPool) ReleaseObj(obj *ReusableObj) error

type ReusableObj

type ReusableObj struct {
}

Jump to

Keyboard shortcuts

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