StudioSol/async

Include option to wait all erros finish

rodrigo-brito opened this issue · 0 comments

In the current version, if 3 functions is given and one of the fail, the async run will stop and return this error.
The feature consists in include a flag to wait all functions finish and return all erros.

Suggestion of signature:

runner := async.NewRunner(tasks...).WaitErrors(true)
err := runner.Do(ctx)

The erros can be merged with the new errors package: https://golang.org/pkg/errors/#New
The option %w will stack all errors in a single one.