pooling

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 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 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) 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