package
0.0.0-20240403195145-a5b82e576be2
Repository: https://github.com/gostdlib/concurrency.git
Documentation: pkg.go.dev
# README
Slices
: Parallel operations on slices
The slices
package provides concurrent operations on slice types. This is for large slices that have complex transformations. For smaller use cases, a non-concurrent for loop
will probably suffice.
go get github.com/gostdlib/concurrency/
A quick look
- Access elements in a slice in parallel to perform some operation
- Support for processing errors
- Support for OpenTelemetry spans
Package purpose
- Reduce programatic errors (goroutine leaks, deadlocks, ...)
- Reuse resources (goroutines)
- Integration with OpenTelemetry
span
s by default
# Functions
Access calls the Accessor for each element in "s".
WithPool sets a goroutines.Pool and its submit options used in a function call.
WithStopOnErr causes the operation to stop if an error occurs.
# Interfaces
SliceOption is an option for functions operating on slices.