waitgroup

package
v0.0.0-...-3596c24 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MIT Imports: 5 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
}

A Group is a collection of goroutines working on subtasks that are part of the same overall task.

A zero Group is valid and does not cancel on error.

func WithCancel

func WithCancel(ctx context.Context) *Group

func WithContext

func WithContext(ctx context.Context) *Group

func WithTimeout

func WithTimeout(ctx context.Context, duration time.Duration) *Group

func (*Group) GOMAXPROCS

func (g *Group) GOMAXPROCS(n int)

GOMAXPROCS set max goroutine to work.

func (*Group) Go

func (g *Group) Go(f func(ctx context.Context) error)

func (*Group) Wait

func (g *Group) Wait() error

Jump to

Keyboard shortcuts

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