pool

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 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
}

Pool 池接受来自客户端的任务,它限制总数 通过回收goroutines到一个给定的数字的goroutines。

func NewPool

func NewPool(cap int) *Pool

func (*Pool) Run

func (p *Pool) Run()

type Task

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

func NewTask

func NewTask(f func() error) *Task

Jump to

Keyboard shortcuts

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