gopool

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package gopool 提供一个协程池接口

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Go

func Go(p Pool, f func())

Go run on the goroutine pool,if pool is nil run on goroutine, never failed

Types

type Pool

type Pool interface {
	// 提交任务
	Go(f func())
	// 动态调整池大小
	Tune(size int)
	// 运行中的实例个数
	Running() int
	// 空闲空间大小
	Free() int
	// 池总大小
	Cap() int
}

Pool 协程池接口

Jump to

Keyboard shortcuts

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