Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parallel ¶
DO NOT USE TODO: errgroup instant fail? TODO: ordered results? WIP
Parallel wraps errgroup, and collects results to an UNORDERED slice. jc: I don't understand ctx enough to return the first error, dismiss results, and kill any running (sub)goroutines.
fn usually consists of a for loop of some kind (ex: bufio.Scanner). Inside the for loop, it shall call g.Go(<something>).
Don't forget to do i, xyz := xyz, hello before g.Go(func() error { return fooBar(i, xyz, returnc) }) (shadowing) https://golang.org/doc/faq#closures_and_goroutines
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.