workerpool

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkerPool

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

func NewWorkerPool

func NewWorkerPool(channelsize int) *WorkerPool

func (*WorkerPool) GetPendingItemCount

func (t *WorkerPool) GetPendingItemCount() int

已经投入队列,未处理完成的任务数量

func (*WorkerPool) GetQSize

func (t *WorkerPool) GetQSize() int

func (*WorkerPool) Idle

func (t *WorkerPool) Idle() bool

func (*WorkerPool) PushItem

func (t *WorkerPool) PushItem(a interface{})

func (*WorkerPool) SetHandler

func (t *WorkerPool) SetHandler(fn func(interface{}))

func (*WorkerPool) SetMaxGoroutine

func (t *WorkerPool) SetMaxGoroutine(nMaxCount int)

func (*WorkerPool) SetMaxIdleGoroutine

func (t *WorkerPool) SetMaxIdleGoroutine(nMaxCount int)

func (*WorkerPool) SetMaxIdleTime

func (t *WorkerPool) SetMaxIdleTime(d time.Duration)

Jump to

Keyboard shortcuts

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