[Top][All Lists]

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

[Discuss-gnuradio] Message Queue Thread Safety

From: Ryan Pape
Subject: [Discuss-gnuradio] Message Queue Thread Safety
Date: Sun, 19 Feb 2012 17:29:59 -0600

I have an application with some nasty race conditions I am trying to pin-point.

The application starts with a 256 channel filterbank. Approx 45 outputs are connected to files, a handful to other blocks ending with a custom block that puts messages in a GR message queue.

The application has a separate thread that is constantly de-queueing items produced by my custom blocks.

Occasionally, and randomly, one of the chains with my custom block appears to stall for an extended time and puts no messages into the queue.  It appears it may restart at a random later time, and in every case I have observed restarting the application fixes the problem immediately. At the same time, another chain continues to send messages as I would expect.

Is having two or more producers and one consumer on one GR message queue across multiple threads a bad idea?  I'm not employing any additional locking on the queue, due to wishful thinking and ignorance.  I could move to a one consumer for each producer model and it would not significantly change my application.


reply via email to

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