pooling

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPoolNotExist = errors.New("pool not exist")
	ErrTimeout      = errors.New("process timeout")
)

Functions

This section is empty.

Types

type Pool

type Pool chan *resource

Pool handles a pool of services.

func New

func New(size int) Pool

New a resource pool of the specified size Resources are created concurrently to save resource initialization time

func (Pool) Roll

func (p Pool) Roll(service func())

Roll wrapper service as function to the resource pool.

Jump to

Keyboard shortcuts

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