// ParallelInt runs the given functions in parallel.
//
// It collects all the errors and results (regardless if there were errors or not). To obtain
// the multiple errors, use the `Errors` function.
ParallelInt runs the given functions in parallel.

It collects all the errors and results (regardless if there were errors or not). To obtain
the multiple errors, use the `Errors` function.
// ParallelInt runs the given functions in parallel . // // It collects all the errors and results ( regardless if there were errors or not ) . To obtain // the multiple errors use the ` Errors ` function .
func (f *Flow) ParallelInt(ctx context.Context, fns ...IntFunc) ([]int, error) {
	if len(fns) == 0 {
		return nil, nil
	}
	c := make(chan intResult)
	f.runAll(len(fns), func(i int) {
		item, err := fns[i](ctx)
		c <- intResult{item, err}
	}, func() { close(c) })
	var (
		out  []int
		errs multiError
	)
	for res := range c {
		if res.err != nil {
			errs = append(errs, res.err)
			continue
		}
		out = append(out, res.item)
	}
	return out, errs.ErrorOrNil()
}
func ( f * Flow ) ParallelInt ( ctx context . Context , fns ... IntFunc ) ( [ ] int , error ) { if len ( fns ) == 0 { return nil , nil } c := make ( chan intResult ) f . runAll ( len ( fns ) , func ( i int ) { item , err := fns [ i ] ( ctx ) c <- intResult { item , err } } , func ( ) { close ( c ) } ) var ( out [ ] int errs multiError ) for res := range c { if res . err != nil { errs = append ( errs , res . err ) continue } out = append ( out , res . item ) } return out , errs . ErrorOrNil ( ) }
ParallelInt runs the given functions in parallel.
ParallelInt runs the given functions in parallel .