zzzz

package
v0.0.0-...-325af03 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

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

Pool alias of ants.Pool

func NewWorkerPool

func NewWorkerPool(size int) (*Pool, error)

NewWorkerPool constructor of Pool

func NewWorkerPoolWithOptions

func NewWorkerPoolWithOptions(size int, options ...ants.Option) (*Pool, error)

NewWorkerPoolWithOptions 创建Worker池, 支持传入ants Option.

func (*Pool) Release

func (p *Pool) Release()

Release close pool and release resources

func (*Pool) Running

func (p *Pool) Running() int

Running return goroutines of runnning

func (*Pool) Submit

func (p *Pool) Submit(task func()) error

Submit submit a task

func (*Pool) Tune

func (p *Pool) Tune(size int)

Tune 调整Worker池容量

type WorkerLogger

type WorkerLogger struct {
}

WorkerLogger log handler

func (WorkerLogger) Printf

func (WorkerLogger) Printf(format string, args ...interface{})

Printf implements ants.Logger

Jump to

Keyboard shortcuts

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