work

package
v0.0.0-...-b03bf0d Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 1 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
}

func New

func New(maxGoroutine int) *Pool

func (*Pool) Run

func (p *Pool) Run(w Worker)

Run 提交工作到工作池

func (*Pool) Shutdown

func (p *Pool) Shutdown()

Shutdown 等待所有goroutine停止工作

type Worker

type Worker interface {
	Task()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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