We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59b3998 commit fd35e3eCopy full SHA for fd35e3e
crates/frame-converter/examples/benchmark.rs
@@ -63,18 +63,13 @@ fn benchmark_pool(
63
pool.submit(frame, i as u64).expect("Submit failed");
64
}
65
66
- let mut received = 0u64;
67
let deadline = Instant::now() + Duration::from_secs(30);
68
69
- while received < frame_count as u64 && Instant::now() < deadline {
70
- if let Some(_converted) = pool.recv_timeout(Duration::from_millis(100)) {
71
- received += 1;
72
- }
+ while Instant::now() < deadline {
+ let _ = pool.recv_timeout(Duration::from_millis(100));
73
let stats = pool.stats();
74
if stats.frames_converted >= frame_count as u64 {
75
- while pool.try_recv().is_some() {
76
77
+ while pool.try_recv().is_some() {}
78
break;
79
80
0 commit comments