An open API service indexing awesome lists of open source software.

https://github.com/yoshuawuyts/parallel-future

structured parallel execution for async Rust
https://github.com/yoshuawuyts/parallel-future

async concurrency parallel-programming rust

Last synced: 4 months ago
JSON representation

structured parallel execution for async Rust

Awesome Lists containing this project

README

        

parallel-future




structured parallel execution for async Rust





Crates.io version



Download



docs.rs docs




API Docs

|

Releases

|

Contributing


## Installation
```sh
$ cargo add parallel-future
```

## Examples

```rust
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][contributing] and take a
look at some of these issues:

- [Issues labeled "good first issue"][good-first-issue]
- [Issues labeled "help wanted"][help-wanted]

[contributing]: https://github.com/yoshuawuyts/parallel-future/blob/master.github/CONTRIBUTING.md
[good-first-issue]: https://github.com/yoshuawuyts/parallel-future/labels/good%20first%20issue
[help-wanted]: https://github.com/yoshuawuyts/parallel-future/labels/help%20wanted

## 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.