[−][src]Macro join::join_async_spawn
Use to spawn futures using ::tokio::spawn
per each step of each branch.
It produces tuple of values or single value in case of 1 branch.
Example:
#![recursion_limit="256"] extern crate join; extern crate futures; use join::join_async_spawn; use futures::future::ready; use futures::stream::{iter, StreamExt}; #[tokio::main] async fn main() { let filtered: Vec<_> = join_async_spawn! { iter(vec![1u8,2,3]) ?> |v| ready(v % 2 == 0) =>[] }.await; assert_eq!(filtered, vec![2]); }