asy

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asy

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

func New

func New() *Asy

func (*Asy) Add

func (m *Asy) Add(fn func(args ...any), args ...any) *Asy

func (*Asy) AddByNum

func (m *Asy) AddByNum(fns []func(), num int) *Asy

func (*Asy) AddByStep

func (m *Asy) AddByStep(fns []func(), step int) *Asy

AddByStep @example AddByStep(tasks,16); // 将tasks拆分成16组,并发执行 这个分组机制有问题,一般是超海量的程序或者数据请求才需要分组并发执行,但fns容易承受不了

func (*Asy) AddFns

func (m *Asy) AddFns(fns []func()) *Asy

AddFns

func (*Asy) Wait

func (m *Asy) Wait()

Jump to

Keyboard shortcuts

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