commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 16/18: runtime: poll blocks


From: git
Subject: [Commit-gnuradio] [gnuradio] 16/18: runtime: poll blocks
Date: Fri, 1 Jul 2016 16:25:45 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch next
in repository gnuradio.

commit 85204abccbf9fe804f3de638366d4783cb95b7de
Author: Bastian Bloessl <address@hidden>
Date:   Thu Jun 30 13:09:41 2016 +0200

    runtime: poll blocks
---
 gnuradio-runtime/lib/tpb_thread_body.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnuradio-runtime/lib/tpb_thread_body.cc 
b/gnuradio-runtime/lib/tpb_thread_body.cc
index 6112381..32c846d 100644
--- a/gnuradio-runtime/lib/tpb_thread_body.cc
+++ b/gnuradio-runtime/lib/tpb_thread_body.cc
@@ -155,8 +155,10 @@ namespace gr {
       case block_executor::BLKD_IN:            // Wait for input.
       {
         gr::thread::scoped_lock guard(d->d_tpb.mutex);
-        while(!d->d_tpb.input_changed) {
-          d->d_tpb.input_cond.wait(guard);
+
+        if(!d->d_tpb.input_changed) {
+          boost::system_time const timeout=boost::get_system_time()+ 
boost::posix_time::milliseconds(250);
+          d->d_tpb.input_cond.timed_wait(guard, timeout);
         }
       }
       break;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]