clock function thread safety - was Re: [PD-dev] devel_0_37 branch

chris clepper cclepper at artic.edu
Mon Jun 2 20:00:34 CEST 2003


>What's wrong with simply putting a mutex around all of Pd? that way other
>threads could just make calls right into "receive" objects without having
>to set and wait for clock callbacks.  Perhaps I'm missing something but that
>seems the much simpler solution for making threaded externs.
>
>Pd's scheduler would simply lock all pf Pd whenever it issues a message or
>runs a DSP tick, and unlock it when it ``idles".
>
>cheers
>Miller
>

Is it not possible to do a mutex thread with the DSP function?  Would 
this assure that the DSP calls would have enough time to complete 
without fighting sys_pollgui() and the other calls for time?  Or 
would those have to be threaded as well?  It seems like when DSP is 
on that all other tasks need to be subservient to the computing of 
audio to ensure proper audio performance.

It would be really great to have some sort of solution to this within 
the Pd scheduler.

cgc




More information about the Pd-dev mailing list