gpool

package
v0.0.0-...-5f1ca4c Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const One int = 1

One 常量1

Variables

This section is empty.

Functions

This section is empty.

Types

type RoutinePool

type RoutinePool struct {
	// contains filtered or unexported fields
}

RoutinePool 结构体 @description 协程实现 go routine pool ,

func NewRoutinePool

func NewRoutinePool(size int) *RoutinePool

NewRoutinePool 初始化

func (*RoutinePool) Add

func (rp *RoutinePool) Add(delta int)

Add 新增 delta个等待

func (*RoutinePool) AddOne

func (rp *RoutinePool) AddOne()

AddOne 新增一个等待

func (*RoutinePool) Done

func (rp *RoutinePool) Done()

Done 解除一个等待

func (*RoutinePool) Wait

func (rp *RoutinePool) Wait()

Wait 等待

Jump to

Keyboard shortcuts

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