On Fri, Mar 02, 2007 at 02:22:50PM +0100, Dominik Auras wrote: > Hi! > > Can I assume gr_buffer + gr_buffer_reader to be thread-safe? > > Regards > Dominik
Hi Dominik, It should be fine, though I don't think it's been tested in a multi-threaded environment. It's single writer, multiple-reader, and each piece of state has only a single modifier. It's basically a variant on the standard lock-free ring buffer. On non-x86 machine SMP machines (e.g. PPC) it may require the addition of memory barriers. Eric _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio