[clug] pthread coroutines
jepri at webone.com.au
Tue Jul 8 01:15:36 EST 2003
That is amazingly rude of the audio library creator to assume that his
library should get control.
Perhaps you can crack it open and rewrite the main loop so it returns.
I've done that before, it's usually not hard in a decently written
On 2003.07.03 08:05, Simon Burton wrote:
> On Wed, 2 Jul 2003 23:24:17 +1000
> Jepri <jepri at webone.com.au> wrote:
> > Waitaminit - I just read that with my thinking cap on...
> > If you only want one out of two threads running all the time, there
> > a common, simlpe portable solution...
> > use a single threaded application.
> > I assumed that you wanted to generalise this to n threads, but from
> > your responses it looks like you really only have two threads
> > and only one at a time.
> > Obrant:
> > There are only a few cases where threading really helps, most of the
> > rest are situations where a non-blocking calls and forking would
> > just as well.
> Yeah, i hear you. Believe me i avoid threads as much as i can.
> In this case i am interfacing to the portaudio library, it uses a
> and i'm not up to slaving the whole of python and python scripts to
> such a callback,
> so now they are different threads ... etc. etc.
> I am thinking about "n threads", and weather this mutex stuff (ie.
> kernel scheduling) would scale,
> it's kinda interesting.
> Simon Burton, B.Sc.
> Licensed PO Box A66
> ANU Canberra 2601
> Ph. 02 6249 6940 \
> http://arrowtheory.com /
More information about the linux