You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for creating this amazing project. It saved me a lot of boiler plates to run async tasks in parallel.
During my useage of this lib, I found that when using tokio as runtime, but not enabling the feature runtime-tokio will produce unexpected behaviors in programs.
Observed behavior:
use futures::prelude::*;use par_stream::prelude::*;let doubled:Vec<_> = stream::iter(0..1000)// doubles the values in parallel.par_then(None,move |value| asyncmove{ value *2})// the collected values will be ordered.collect().await;let expect:Vec<_> = (0..1000).map(|value| value *2).collect();assert_eq!(doubled, expect);
assert failed because the variable doubled is an empty Vector.
Expected behavior:
panic during compilation.
Thanks for supporting!
The text was updated successfully, but these errors were encountered:
I've noticed I've run into this kind of issue when I forget to add the tokio runtime feature in Cargo.toml, like so: par-stream = { version = "0.10.2", features = ["runtime-tokio"] }
Without a runtime, it just passes through, doing nothing. I'm not sure if this is desirable, tbh, but now I know :)
Hi,
Thanks for creating this amazing project. It saved me a lot of boiler plates to run async tasks in parallel.
During my useage of this lib, I found that when using
tokio
as runtime, but not enabling the featureruntime-tokio
will produce unexpected behaviors in programs.Observed behavior:
assert failed because the variable
doubled
is an empty Vector.Expected behavior:
panic
during compilation.Thanks for supporting!
The text was updated successfully, but these errors were encountered: