Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttrSlice ¶
AttrSlice returns the optimal number of slices based on the input slice length and the number of CPU cores available.
func ParallelForEach ¶ added in v1.44.0
ParallelForEach executes a provided function concurrently on each element of a slice using multiple goroutines. The number of goroutines is determined by the numThreads parameter. If the slice is empty or numThreads is less than or equal to zero, the function returns immediately. The fn parameter is a function that takes the index and value of an element in the slice as arguments.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.