pooling

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package pooling implements the wayback workers pool.

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type Pool

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

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) Close added in v0.16.0

func (p *Pool) Close()

Close closes worker pool

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