Registry / utility / fatih-semgroup

fatih-semgroup

JSON →
library1.3.0gogounverified

Package semgroup provides synchronization and error propagation for groups of goroutines with a weighted semaphore, accumulating all errors.

go get github.com/fatih/semgroup
INSTALL
IMPORT
SIG · FATIH-SEMGROUP
F
fatih-semgroup
utilitygov1.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

semgroup
github.com/fatih/semgroup

Run goroutines with a concurrency limit of 5

package main import ( "fmt" "github.com/fatih/semgroup" ) func main() { sg := semgroup.NewGroup(context.Background(), 5) for i := 0; i < 10; i++ { i := i sg.Go(func() error { fmt.Println(i) return nil }) } err := sg.Wait() fmt.Println(err) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.3.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
fatih-semgroup — go get fatih-semgroup · libregistry