PackageTrack
Sign in Get early access

futures-concurrency

Structured concurrency operations for async Rust

7.7.1 9.4M downloads/mo #3212 most downloaded on crates.io yoshuawuyts/futures-concurrency

What this package is like to depend on

Last release 7 months ago

18 Jan 2026

Release timing varies

gaps range from 2 weeks to 12 months

Some releases are documented

notes for 10 of 31 stable releases

Nothing withdrawn

no release was ever pulled

5 years old

31 releases · first in 2021

2 releases in the last 12 months

see the full history below

Release timeline

31 releases · Aug 2021 to Jan 2026
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 31
  1. 7.7.1 18 Jan 2026
    Release notes

    What's Changed

    • fix(indexer): use a static divisor when possible by @Ddystopia in #217

    Full Changelog: v7.7.0...v7.7.1

    Open source →
    Release notes

    v7.7.1 Latest

    Latest

    Compare

    Choose a tag to compare

    Open source →
  2. 7.7.0 11 Jan 2026
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v7.6.3...v7.7.0

    Open source →
    Release notes

    v7.7.0

    Compare

    Choose a tag to compare

    Open source →
  3. 7.6.3 29 Jan 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v7.6.2...v7.6.3

    Open source →
    Release notes

    v7.6.3

    Compare

    Choose a tag to compare

    Open source →
  4. 7.6.2 24 Oct 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v7.6.1...v7.6.2

    Open source →
    Release notes

    v7.6.2

    Compare

    Choose a tag to compare

    Open source →
  5. 7.6.1 09 Jun 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: v7.6.0...v7.6.1

    Open source →
    Release notes

    v7.6.1

    Compare

    Choose a tag to compare

    Open source →
  6. 7.6.0 12 Apr 2024
    Release notes

    ✨ Portable Concurrent Async Iteration ✨

    This release introduces the ConcurrentStream API: a concurrent async/.await adaptation of Rayon's ParallelStream API. We've been trying to implement this API for the past six or so years, and we've happy to announce we finally have a working implementation!

    The main feature that sets this implementation apart from other, similar attempts is that it works for any existing Stream impl. All you need to do is call the .co() method to obtain a ConcurrentStream, and from that point all Stream combinators should just work as expected:

    use futures_concurrency::prelude::*;
    
    let v: Vec<_> = stream::repeat("chashu")
        .co()   // ← call this to convert any `Stream` into a `ConcurrentStream`
        .take(2)
        .map(|msg| async move { format!("hello {msg}") })
        .collect()
        .await;
    
    assert_eq!(v, &["hello chashu", "hello chashu"]);

    See the call to collect at the end there? That's right: that's concurrent async iteration, collecting back into a single structure. This makes writing fan-out/fan-in pipelines trivial to author. But that's not all: in addition to converting into collections, we can also directly convert collections into ConcurrentStream implementations too:

    use futures_concurrency::prelude::*;
    
    let v: Vec<_> = vec!["chashu", "nori"]
        .into_co_stream()  // ← call this to convert collections into concurrent async iterators
        .map(|msg| async move { format!("hello {msg}") })
        .collect()
        .await;

    The amount of concurrency by default is unbounded, but can be bounded by calling the limit method. This will apply backpressure should the stream produce items faster than the concurrent iterator can process them.

    This API also resolves the buffered streams problem. ConcurrentStream removes the need for the dreaded combination of mapping to futures and then calling the futures-rs buffered method. Instead it ensures that the processing of items in a loop always happens in concert with the execution of the concurrent futures 1.

    Notably this API will work with any async runtime or async framework, because it makes no assumptions about the underlying runtime. The only assumption is makes is that an allocator is available. This means that at this time, unlike most other APIs in futures-concurrency this will not work on #[no_std] environments. This, however, is not an inherent restriction but merely an artifact of the implementation. In the future we may explore porting this to a #[no_std] compatible version - this will require some minor API changes, but should, as a system, likely work.

    In order to make this system work with parallel execution it should be possible to write a custom adapter. We encourage async runtimes to wrap the ConcurrentStream trait exposed in this crate to create their own ParallelStream system. This can depend on the runtime, and ensure that all execution not only happens concurrently, but can also be scheduled on multiple cores.

    We're excited for people to give this a try. We certainly hope this lowers the bar for correctly applying structured, asynchronous, concurrent streaming processing in Rust!

    What's Changed

    Full Changelog: v7.5.0...v7.6.0


    1. There is a more elaborate version of this problem we don't have a user story for yet. Rust's futures model couples "liveness" to "backpressure". In theory we might fail to send keepalive messages if we apply backpressure for too long; this is a direct artifact of queueing theory, and would be a reason to add some form of async Future::pending / Future::poll_pending method for. This is a more subtle / niche issue than "barbara battles buffered streams". But it's worth explicitly calling out the limits of our solutions.

    Open source →
    Release notes

    v7.6.0

    Compare

    Choose a tag to compare

    Open source →
  7. 7.5.0 11 Mar 2024
    Release notes

    This release adds support for no_std and alloc environments to futures-concurrency. Starting this release (v7.5.0) you can pass feature flags to your Cargo.toml to select the right feature set for your environment:

    [dependencies]
    # std
    futures-concurrency = "7.5.0"
    
    # alloc
    futures-concurrency = { version = "7.5.0", default-features = false, features = ["alloc"] }
    
    # no_std
    futures-concurrency = { version = "7.5.0", default-features = false }

    What's Changed

    New Contributors

    Full Changelog: v7.4.3...v7.5.0

    Open source →
    Release notes

    v7.5.0

    Compare

    Choose a tag to compare

    Open source →
  8. 7.4.3 22 Sep 2023
    Release notes

    This release fixes a bug introduced in v7.3.0 related to the try_join family of operations. Please consider upgrading to this release if you're running v7.3.0 or later.

    What's Changed

    Full Changelog: v7.4.2...v7.4.3

    Open source →
    Release notes

    v7.4.3

    Compare

    Choose a tag to compare

    Open source →
  9. 7.4.2 25 Aug 2023
    Release notes

    What's Changed

    Full Changelog: v7.4.1...v7.4.2

    Open source →
    Release notes

    v7.4.2

    Compare

    Choose a tag to compare

    Open source →
  10. 7.4.1 14 Aug 2023
    Release notes

    What's Changed

    Full Changelog: v7.4.0...v7.4.1

    Example

    use futures_concurrency::stream::StreamGroup;
    use lending_stream::prelude::*;
    use futures_lite::stream;
    
    // Setup the stream group and populate it with one stream
    let mut group = StreamGroup::new();
    group.insert(stream::once(4));
    
    let mut index = 3;
    let mut out = 0;
    let mut group = group.lend_mut();
    while let Some((group, num)) = group.next().await {
        if index != 0 {
            // Update the group while iterating over the group's contents
            group.insert(stream::once(index));
            index -= 1;
        }
        out += num;
    }
    
    assert_eq!(out, 10);
    Open source →
    Release notes

    v7.4.1

    Compare

    Choose a tag to compare

    Open source →
  11. 7.4.0 13 Aug 2023

    Nothing published for this version

  12. 7.3.0 23 Jun 2023

    Nothing published for this version

  13. 7.2.1 22 May 2023

    Nothing published for this version

  14. 7.2.0 05 Apr 2023

    Nothing published for this version

  15. 7.1.1 05 Apr 2023

    Nothing published for this version

  16. 7.1.0 08 Feb 2023

    Nothing published for this version

  17. 7.0.0 17 Nov 2022

    Nothing published for this version

  18. 6.0.1 14 Oct 2022

    Nothing published for this version

  19. 6.0.0 14 Oct 2022

    Nothing published for this version

  20. 5.0.1 10 Oct 2022

    Nothing published for this version

  21. 5.0.0 10 Oct 2022

    Nothing published for this version

  22. 4.0.0 09 Oct 2022

    Nothing published for this version

  23. 3.1.0 08 Oct 2022

    Nothing published for this version

  24. 3.0.2 14 Jun 2022

    Nothing published for this version

  25. 3.0.0 14 Jun 2022

    Nothing published for this version

  26. 2.0.3 01 Mar 2022

    Nothing published for this version

  27. 2.0.2 01 Mar 2022

    Nothing published for this version

  28. 2.0.1 27 Feb 2022

    Nothing published for this version

  29. 2.0.0 22 Dec 2021

    Nothing published for this version

  30. 1.1.0 19 Oct 2021

    Nothing published for this version

  31. 1.0.0 29 Aug 2021

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive