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

Thomas Grill t.grill at
Mon Jun 2 21:00:21 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
> 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".

that sounds very reasonable and efficient.
The reason why i preferred the clock functions is probably my lack of
Is my understanding right that there shall be something like pd_lock() and
pd_unlock() functions that are used around every call into the pd API from a
second thread?

best greetings,

More information about the Pd-dev mailing list