[PD] [PD-announce] Pd 0.41 test 10 released

Thomas Grill gr at grrrr.org
Fri Dec 28 20:47:26 CET 2007


Am 28.12.2007 um 20:25 schrieb Miller Puckette:

> I should have put the lock in and forgot... thanks for the reminder.
>
> I'm not at all sure how to handle "idle" in the callback case.  One
> could just call the function forever, but that seems like burning the
> CPU for nothing.

You might have noticed that the idle callback function in pd-devel  
returns 0 (when it never wants to be called again), 1 (when it wants  
to be called again as soon as possible) or 2 (when it wants to be  
called again at the next scheduler iteration). This works pretty well  
and helps to preserve cpu.

> Alternatively, "idle" processing might want to take place
> in a different thread to be set up by whatever external code wants to
> do the idle processing, trusting to the OS to preempt to the callback
> thread when it becomes runnable.
>

It's a cleaner approach given the fact that the functionality allowed  
within the audio driver callback is limited, but it involves locking  
which isn't nice.

gr~~~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2407 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20071228/764f72f2/attachment.bin>


More information about the Pd-list mailing list