pool

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ScaleThreshold int32
}

func NewConfig

func NewConfig() *Config

type Pool

type Pool interface {
	Name() string
	SetCap(cap int32)
	Go(f func())
	CtxGo(ctx context.Context, f func())
	SetPanicHandler(f func(context.Context, interface{}))
	WorkerCount() int32
}

func NewPool

func NewPool(name string, cap int32, config *Config) Pool

NewPool creates a new pool with the given name, cap and config.

Jump to

Keyboard shortcuts

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