The sleep method can be better written and it currently suffers from a race that causes a deadlock.
Minimal repro
tracing::info!("Starting tasks"); let mut join_set = JoinSet::default(); for _i in 0..50 { join_set.spawn(async move { for _i in 0..10 { azure_core::sleep(Duration::from_millis(100)).await; } }); } while let Some(_) = join_set.join_next().await { } tracing::info!("Tasks done");
The sleep method can be better written and it currently suffers from a race that causes a deadlock.
Minimal repro
tracing::info!("Starting tasks"); let mut join_set = JoinSet::default(); for _i in 0..50 { join_set.spawn(async move { for _i in 0..10 { azure_core::sleep(Duration::from_millis(100)).await; } }); } while let Some(_) = join_set.join_next().await { } tracing::info!("Tasks done");