async-rs / parallel-stream

Data parallelism library for async-std.
https://docs.rs/parallel-stream
Apache License 2.0
93 stars 16 forks source link

Please document how to handle errors #18

Open joshtriplett opened 4 years ago

joshtriplett commented 4 years ago

With standard iterators, it's possible to call map with a function that returns a Result<T, E>, then collect into a Result<Vec<T>, E>. I'd like to do something similar with a ParallelStream, but it looks like the collect method only supports collecting into a Vec, not a Result.

Would you consider providing some documentation on how to handle errors that occur in one of the parallel function calls?