gpool

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MPL-2.0 Imports: 4 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 {
	sync.Mutex
	sync.WaitGroup
	// contains filtered or unexported fields
}

func NewTaskPool

func NewTaskPool(size int) *Pool

func (*Pool) Close

func (p *Pool) Close()

Close 关闭通道释放资源,

func (*Pool) GetSize

func (p *Pool) GetSize() uint64

func (*Pool) Running

func (p *Pool) Running() uint64

Running 获取Runing状态的协程数

func (*Pool) Submit

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

Submit 提交任务到task通道中

Jump to

Keyboard shortcuts

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