[PD-dev] how to not cause audio drops with threads

Thomas Grill gr at grrrr.org
Sun Sep 12 00:05:42 CEST 2004


> Hi Grill,

Hi Schouten,

> > the ring buffer idea is really great and if you don't mind i'll take
this
> > over to flext which uses dynamic allocation at the moment.
>
> of course not.

already happened.... it's in the cvs, file flqueue.cpp


> so you do use locks in the communication protocol between 2 threads?
>
> if so, that's exactly what i'm trying to avoid with this.. in practice it
> works most of the time for small things, but it's no guarantee to avoid
> priority inversion. there's interesting stuff about this on the LAD list
> you know.

i'll have to read this, but it seems the new flext message passing code will
work without locks by just depending on head and tail indices to the ring
buffer (actually there are two ring buffers, one for the atoms passed, and
one for the metadata)

best greetings,
Thomas





More information about the Pd-dev mailing list