Skip to content

gogroup provides a group of goroutines used to run functions concurrently.

License

Notifications You must be signed in to change notification settings

newmo-oss/gogroup

Repository files navigation

gogroup Go ReferenceGo Report Card

gogroup provides a group of goroutines used to run functions concurrently.

Usage

var g gogroup.Group

g.Add(func(ctx context.Context) error {
	// do something
	return nil
})

g.Add(func(ctx context.Context) error {
	// convert panic as an error and cancel the context
	panic("panic")
})

if err := g.Run(ctx); err != nil {
	return err
}

License

MIT

About

gogroup provides a group of goroutines used to run functions concurrently.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages