jobsite

package module
v0.0.0-...-5d1aeb6 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 8 Imported by: 0

README

jobsite

一个简单的异步工作池,无序的

PS: 无依赖

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStopped = errors.New(`jobsite: stopped`)

Functions

This section is empty.

Types

type Func

type Func func()

type JobSite

type JobSite interface {
	Closed() bool
	Call(ctx context.Context, task Func) error
	Stop()
}

JobSite is a job pool's.

func New

func New(num int, logs ...*log.Logger) JobSite

New return a job pool's

Jump to

Keyboard shortcuts

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