
26 Nov
2008
26 Nov
'08
8:45 a.m.
It would be very helpful if this container provided lock-free thread-safe implementation of concurrent reads and writes by two threads (producer-consumer), as such function is often needed where ring buffers are used. A prime example of that being receiving audio from a callback (possibly a signal handler), where the callback must not be blocked in any circumstances (meaning that it cannot wait for a lock). As this is a rather common use case, the realtime audio processing framework JACK actually implements such lock-free ring buffer: http://jackit.sourceforge.net/cgi-bin/lxr/http/source/libjack/ringbuffer.c Is there any reason why Boost.circular_buffer should not also implement this kind of thread-safety?