yoshuawuyts / futures-concurrency

Structured concurrency operations for async Rust
https://docs.rs/futures-concurrency
Apache License 2.0
382 stars 29 forks source link

Using .join() on an empty Vec stalls #153

Closed michael-temp closed 10 months ago

michael-temp commented 11 months ago

Is this the intended behaviour?

futures-concurrency = "7.4.1"
    pub use futures_concurrency::prelude::*;

    #[tokio::test]
    // #[ignore]
    async fn test_join_empty_vec() -> Result<()> {
        Vec::<AbortOnDrop<()>>::new().join().await;

        Ok(())
    }

Result:

running 1 test
        SLOW [>  5.000s] tokio_fixes::tests::test_join_empty_vec
yoshuawuyts commented 10 months ago

You're right that this is not the intended behavior. I've posted a patch for it in https://github.com/yoshuawuyts/futures-concurrency/pull/154. Thank you for reporting this!

yoshuawuyts commented 10 months ago

Fixed in v7.4.2