Skip to content

structured parallel execution for async Rust

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

yoshuawuyts/parallel-future

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

parallel-future

structured parallel execution for async Rust

Installation

$ cargo add parallel-future

Examples

use parallel_future::prelude::*;
use futures_concurrency::prelude::*;

async_std::task::block_on(async {
    let a = async { 1 }.par();        // ← returns `ParallelFuture`
    let b = async { 2 }.par();        // ← returns `ParallelFuture`

    let (a, b) = (a, b).join().await; // ← concurrent `.await`
    assert_eq!(a + b, 3);
})

Safety

This crate uses #![deny(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.

Contributing

Want to join us? Check out our "Contributing" guide and take a look at some of these issues:

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

structured parallel execution for async Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages