summaryrefslogtreecommitdiffstats
path: root/host/examples/benchmark_rate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/examples/benchmark_rate.cpp')
-rw-r--r--host/examples/benchmark_rate.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/host/examples/benchmark_rate.cpp b/host/examples/benchmark_rate.cpp
index 8e910b4b3..688cd797a 100644
--- a/host/examples/benchmark_rate.cpp
+++ b/host/examples/benchmark_rate.cpp
@@ -126,11 +126,9 @@ void benchmark_tx_rate_async_helper(uhd::usrp::multi_usrp::sptr usrp){
//setup variables and allocate buffer
uhd::async_metadata_t async_md;
- while (true){
+ while (not boost::this_thread::interruption_requested()){
- if (not usrp->get_device()->recv_async_msg(async_md)){
- if (boost::this_thread::interruption_requested()) return;
- }
+ if (not usrp->get_device()->recv_async_msg(async_md)) continue;
//handle the error codes
switch(async_md.event_code){