Skip to content

Package gruppen provides a series of concurrent executors for functions.

License

Notifications You must be signed in to change notification settings

WenxingLai/gruppen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gruppen

This repository provides Go concurrency utils to execute tasks and collect results or errors concurrently.

gruppen.Gather and gruppen.GatherSoon use errgroup.Group to control and limit concurrency, the results are collected to a []interface{}. If any non-nil error occurs, the first one would be returned.

When a non-nil error is found, gruppen.GatherSoon uses an additional channel to cancel all the tasks not started; while gruppen.Gather continues to execute the remaining tasks with the cancel func for the ctx called.

gruppen comes from the name of a well-known 20-th century composition for three orchestras by Karlheinz Stockhausen.

Comparison

facebookgo/errgroup is similar to sync.WaitGroup, but it collects all the errors.

gollback and hunch provide functions as gruppen.Gather does, but the concurrency cannot be set directly.

About

Package gruppen provides a series of concurrent executors for functions.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages