Skip to content

Commit

Permalink
bench: improve polling
Browse files Browse the repository at this point in the history
  • Loading branch information
geofmureithi committed Jun 26, 2024
1 parent 7bbde7f commit b0af55c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benches/storages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ macro_rules! define_bench {
for _i in 0..s {
let _ = s1.push(TestJob).await;
}
while s1.len().await.unwrap_or(-1) != 0 {
while counter.0.load(Ordering::Relaxed) != s && s1.len().await.unwrap_or(-1) != 0 {
interval.tick().await;
}
counter.0.store(0, Ordering::Relaxed);
Expand Down

0 comments on commit b0af55c

Please sign in to comment.