From d7a4ef00ad96a06b1b6a3faac81bdf5bafd8d466 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 19 Jun 2011 20:34:13 -0700 Subject: uhd: benchmark rate fix so we dont use metadata on timeout --- host/examples/benchmark_rate.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'host/examples') 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){ -- cgit v1.2.3