[LAD] [ot] efficient (event)-loop writing
Gabriel M. Beddingfield
gabriel at teuton.org
Sat Sep 5 15:03:14 UTC 2009
Hi Julien,
Sounds like the producer-consumer pattern to me:
http://en.wikipedia.org/wiki/Producer-consumer_problem
http://qt.nokia.com/doc/4.5/threads-semaphores.html
Hope this helps,
Gabriel
p.s. I'm top posting because I think Julien prefers it. :-)
On Sat, 5 Sep 2009, Julien Claassen wrote:
> Hello everyone!
> I have a problem and I'm not sure how to solve it in an optimal way. I have
> several threads running.
> 1. An input thread (computer-keyboard/mouse)
> 2. An output thread (monitor other devices0
> 3. A working thread (the engine)
> Now I wondered, what is the most efficient way to write the loops for the
> input and output threads in a way, that they are always ready to accept
> something coming.
> I thought about something with signals, which is fine, as far as the output
> is concerned, but the input comes from the user and only the device gets it
> coming first and it can't really send a signal?
> Any tipps, good guide or constructs, which have proven to be efficient?
> Please/
> Best regards
> Julien
>
> --------
> Music was my first love and it will be my last (John Miles)
>
> ======== FIND MY WEB-PROJECT AT: ========
> http://ltsb.sourceforge.net
> the Linux TextBased Studio guide
> ======= AND MY PERSONAL PAGES AT: =======
> http://www.juliencoder.de
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
>
More information about the Linux-audio-dev
mailing list