Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ForAll ¶
func ForAll(iter interface{}, f interface{})
ForAll uses an iterator to execute an iterand function on each value returned by the iterator, using a background goroutine for CPU and distributing the iterands evenly across each goroutine. An iterator can be an array, a slice, a map, or an int. For arrays, and slices, the iterand function must accept an int index as the only argument. For maps, the iterand function must accept a key as the only argument. For ints, the iterand function must accept an int, in the range [0, n), as the only argument. This function blocks until all goroutines have terminated.
func Forward ¶
func Forward(done <-chan struct{}, in interface{}, out interface{})
Forward all values from an input channels into an output channel. Forward is blocking and panics when the input channel type do no match the output channel.
func Merge ¶
func Merge(done <-chan struct{}, ins interface{}, out interface{})
Merge multiple input channels into an output channel. Merge accepts a channel of channels as input. For each of the channel read from the channel of channels, all values are consumed and produced onto the output channel. Merge is blocking and panics when the input channel types do no match the output channel.
func ParBegin ¶
func ParBegin(fs ...func())
ParBegin multiple functions onto background goroutines. This function blocks until all goroutines have terminated.
func ParForAll ¶
func ParForAll(iter interface{}, f interface{})
ParForAll uses an iterator to execute an iterand function on each value returned by the iterator, using a background goroutine for each iteration. An iterator can be an array, a slice, a map, or an int. For arrays, and slices, the iterand function must accept an int index as the only argument. For maps, the iterand function must accept a key as the only argument. For ints, the iterand function must accept an int, in the range [0, n), as the only argument. This function blocks until all goroutines have terminated.
Types ¶
This section is empty.