gopool

package
v0.0.0-...-680e691 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Go

func Go(fn Func)

Go 执行回调函数

Types

type Func

type Func func()

Func 回调函数

type Pool

type Pool interface {
	Post(fn Func) // 提交任务,等待异步执行
	Wait()        // 等待所有goroutine完成
}

Pool goroutine缓存队列,限制goroutine最大数量 TODO: support cancel task?

func NewPool

func NewPool(max int) Pool

Jump to

Keyboard shortcuts

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