Re: [LAD] [ot] efficient (event)-loop writing

From: Gabriel M. Beddingfield <gabriel@email-addr-hidden>
Date: Sat Sep 05 2009 - 18:03:14 EEST

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@email-addr-hidden
> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
>
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Sat Sep 5 20:15:02 2009

This archive was generated by hypermail 2.1.8 : Sat Sep 05 2009 - 20:15:02 EEST