async

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

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

Group has several workers, and the group can execute these workers concurrently, wait for the workers to finish within a specified time, and receive the results returned by these workers.

func NewGroup

func NewGroup(ctx context.Context) *Group

func (*Group) Add

func (g *Group) Add(w func(stopCh chan interface{}))

Add a worker to group

func (*Group) Wait

func (g *Group) Wait() []error

Wait execute all workers concurrently, and wait for all workers to end.

Jump to

Keyboard shortcuts

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