summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim O'Shea <tim.oshea753@gmail.com>2014-02-05 17:04:16 -0500
committerTom Rondeau <tom@trondeau.com>2014-02-16 11:32:23 -0500
commitf43151d00e7f502281259952397e699f4beb4f08 (patch)
treef90f933c9ca8007c27c37573c9362ea900cef1a4
parent295ba353abebfedf90ece523343bcfeea2c2149d (diff)
runtime: warn when dropping asynchronous messages due to full asynch message queue, increase default asynch max buffer depth to 8192
-rw-r--r--gnuradio-runtime/gnuradio-runtime.conf.in2
-rw-r--r--gnuradio-runtime/lib/tpb_thread_body.cc12
2 files changed, 10 insertions, 4 deletions
diff --git a/gnuradio-runtime/gnuradio-runtime.conf.in b/gnuradio-runtime/gnuradio-runtime.conf.in
index 37d9be6f9d..0996fb21aa 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 f6f09a9c3e..ea5d80a9dc 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);
+ }
}
}
}