[−][src]Trait par_stream::ParFuture
An extension trait for Future that provides combinator functions for parallelism.
It simplifies the writing of spawning a parallel task. The following code are equivalent.
use futures::stream::StreamExt; use par_stream::ParFuture; #[async_std::main] async fn main() { // original async_std::task::spawn(async move { println!("a parallel task"); }) .await; // using the method async move { println!("a parallel task"); } .spawned() .await; }
Provided methods
pub fn spawned<T>(self) -> JoinHandle<T>ⓘNotable traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = T; where
Self: 'static + Future<Output = T> + Send + Sized,
T: 'static + Send, [src]
Notable traits for JoinHandle<T>
impl<T> Future for JoinHandle<T> type Output = T;Self: 'static + Future<Output = T> + Send + Sized,
T: 'static + Send,
Spawn a task that polls the given future.