routinegroup

package
v0.0.0-...-e311a6d Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPoolSize = 1000

Variables

View Source
var (
	ErrUnknownGroupType   = errors.New("unknown group type")
	ErrPoolNotInitialized = errors.New("pool not initialized")
)

Functions

This section is empty.

Types

type AntsGroup

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

func (*AntsGroup) Close

func (g *AntsGroup) Close() error

func (*AntsGroup) SetLimit

func (g *AntsGroup) SetLimit(n int)

func (*AntsGroup) Submit

func (g *AntsGroup) Submit(task func() error)

func (*AntsGroup) Wait

func (g *AntsGroup) Wait() error

type ErrGroup

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

func (*ErrGroup) Close

func (g *ErrGroup) Close() error

func (*ErrGroup) SetLimit

func (g *ErrGroup) SetLimit(n int)

func (*ErrGroup) Submit

func (g *ErrGroup) Submit(task func() error)

func (*ErrGroup) Wait

func (g *ErrGroup) Wait() error

type Group

type Group interface {
	io.Closer
	Submit(task func() error)
	Wait() error
	SetLimit(n int)
}

func NewAntsGroup

func NewAntsGroup(pool *ants.Pool) Group

func NewErrGroup

func NewErrGroup() Group

type GroupType

type GroupType uint

type Option

type Option func(*groupOptions)

Jump to

Keyboard shortcuts

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