From cb1649d201e41c85ed77256712309706ed1a805d Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 21 Apr 2017 22:33:16 -0700 Subject: uhd: tasks now use std::threads under the hood, and can't be interrupted USRP1 and USRP2 used tasks that relied on Boost thread interruption mechanisms. These were replaced with explicit atomics. --- host/lib/usrp/usrp1/soft_time_ctrl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'host/lib/usrp/usrp1/soft_time_ctrl.cpp') diff --git a/host/lib/usrp/usrp1/soft_time_ctrl.cpp b/host/lib/usrp/usrp1/soft_time_ctrl.cpp index bb8b3a704..9cef99a60 100644 --- a/host/lib/usrp/usrp1/soft_time_ctrl.cpp +++ b/host/lib/usrp/usrp1/soft_time_ctrl.cpp @@ -199,8 +199,9 @@ public: void recv_cmd_task(void){ //task is looped boost::shared_ptr cmd; - _cmd_queue.pop_with_wait(cmd); - recv_cmd_handle_cmd(*cmd); + if (_cmd_queue.pop_with_timed_wait(cmd, 0.25)) { + recv_cmd_handle_cmd(*cmd); + } } bounded_buffer &get_async_queue(void){ -- cgit v1.2.3