-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
When using CollectWithErrs, I noticed that the results aren't returned in the order of invocations of .Go.
Items are added in order from the pipe
https://github.com/wandb/parallel/blob/main/collect.go#L188
And the pipe is sent to immediately when Go completes
https://github.com/wandb/parallel/blob/main/collect.go#L348
To have order, I can return an indexed struct and sort myself, but I was wondering if it would make sense to do this in the library? It seems to make the executor easier to use, especially when compared to e.g. errgroup. Otherwise, maybe the doc comment can include a note that results aren't ordered in any way?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels