Re: [LAD] how to store deferred events in a real time audio app?

From: Paul Davis <paul@email-addr-hidden>
Date: Tue Dec 20 2011 - 17:01:26 EET

On Tue, Dec 20, 2011 at 8:24 AM, Tim Goetze <tim@email-addr-hidden> wrote:

> Alternatively, out-of-order queuing can be dealt with by sorting the
> contents of the FIFO in the consuming thread (since the write position
> only ever increases, sorting everything before it is safe).

as long as the length of the FIFO is relatively small, this is true.
sorting is rarely linear though, so you need to be careful if you want
this to scale to absurdly large message queues :)

>  Multiple
> writers can be supported locklessly by employing one FIFO per writing
> thread (the consuming thread peeks at the contents of all FIFOs before
> deciding which event to pop first).

true, though this is more complex for the reader, and the writers are
rarely under RT constraints which means that the serialization via a
lock doesn't hurt anyone.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Tue Dec 20 16:15:02 2011

This archive was generated by hypermail 2.1.8 : Tue Dec 20 2011 - 16:15:03 EET