commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 07/16: runtime: warn when dropping asynchro


From: git
Subject: [Commit-gnuradio] [gnuradio] 07/16: runtime: warn when dropping asynchronous messages due to full asynch message queue, increase default asynch max buffer depth to 8192
Date: Sun, 16 Feb 2014 21:11:20 +0000 (UTC)

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

trondeau pushed a commit to branch master
in repository gnuradio.

commit f43151d00e7f502281259952397e699f4beb4f08
Author: Tim O'Shea <address@hidden>
Date:   Wed Feb 5 17:04:16 2014 -0500

    runtime: warn when dropping asynchronous messages due to full asynch 
message queue, increase default asynch max buffer depth to 8192
---
 gnuradio-runtime/gnuradio-runtime.conf.in |  2 +-
 gnuradio-runtime/lib/tpb_thread_body.cc   | 12 +++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/gnuradio-runtime/gnuradio-runtime.conf.in 
b/gnuradio-runtime/gnuradio-runtime.conf.in
index 37d9be6..0996fb2 100644
--- a/gnuradio-runtime/gnuradio-runtime.conf.in
+++ b/gnuradio-runtime/gnuradio-runtime.conf.in
@@ -7,7 +7,7 @@ verbose = False
 
 # The maximum number of messages a block will store up before pruning
 # the queue by popping messages from the front.
-max_messages = 100
+max_messages = 8192
 
 
 [LOG]
diff --git a/gnuradio-runtime/lib/tpb_thread_body.cc 
b/gnuradio-runtime/lib/tpb_thread_body.cc
index f6f09a9..ea5d80a 100644
--- a/gnuradio-runtime/lib/tpb_thread_body.cc
+++ b/gnuradio-runtime/lib/tpb_thread_body.cc
@@ -73,8 +73,10 @@ namespace gr {
         else {
           // If we don't have a handler but are building up messages,
           // prune the queue from the front to keep memory in check.
-          if(block->nmsgs(i.first) > max_nmsgs)
+          if(block->nmsgs(i.first) > max_nmsgs){
+            GR_LOG_WARN(LOG,"asynchronous message buffer overflowing, dropping 
message");
             msg = block->delete_head_nowait(i.first);
+            }
         }
       }
 
@@ -121,8 +123,10 @@ namespace gr {
             else {
                 // leave msg in queue if no handler is defined
                 // start dropping if we have too many
-                if(block->nmsgs(i.first) > max_nmsgs)
+                if(block->nmsgs(i.first) > max_nmsgs){
+                    GR_LOG_WARN(LOG,"asynchronous message buffer overflowing, 
dropping message");
                     msg = block->delete_head_nowait(i.first);
+                }
             }
           }
          if (d->done()) {
@@ -152,8 +156,10 @@ namespace gr {
             else {
                 // leave msg in queue if no handler is defined
                 // start dropping if we have too many
-                if(block->nmsgs(i.first) > max_nmsgs)
+                if(block->nmsgs(i.first) > max_nmsgs){
+                    GR_LOG_WARN(LOG,"asynchronous message buffer overflowing, 
dropping message");
                     msg = block->delete_head_nowait(i.first);
+                    }
                 }
             }
         }



reply via email to

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