Skip to content

Commit

Permalink
Don't keep generating transactions in non-sustained bench-tps mode (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sakridge committed Jan 10, 2020
1 parent 865c424 commit 2e89ec9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bench-tps/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ where
sleep(Duration::from_millis(1));
}
} else {
while shared_tx_active_thread_count.load(Ordering::Relaxed) > 0 {
while !shared_txs.read().unwrap().is_empty()
|| shared_tx_active_thread_count.load(Ordering::Relaxed) > 0
{
sleep(Duration::from_millis(1));
}
}
Expand Down

0 comments on commit 2e89ec9

Please sign in to comment.