Hi,
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".
that sounds very reasonable and efficient. The reason why i preferred the clock functions is probably my lack of insight. 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, Thomas