goroutinepool

package module
v0.0.0-...-acad750 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: MIT Imports: 1 Imported by: 0

README

goroutine-pool

goroutine-pool

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoroutinePool

type GoroutinePool struct {
	Num int
	// contains filtered or unexported fields
}

GoroutinePool 协程池对象

func New

func New(num int) *GoroutinePool

func (*GoroutinePool) AddTask

func (t *GoroutinePool) AddTask(task Task)

AddTask 添加任务

func (*GoroutinePool) Start

func (t *GoroutinePool) Start()

Start 启动协程池

type Task

type Task interface {
	Running()
}

Task 定义任务接口

Jump to

Keyboard shortcuts

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