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

Miller Puckette mpuckett at man104-1.ucsd.edu
Mon Jun 2 17:54:12 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



On Mon, Jun 02, 2003 at 04:04:26PM +0200, Thomas Grill wrote:
> Hi Günter,
> 
> > I just opened the devel_0_37 branch on CVS. There are not too many
> > differences between Millers version and this one.
> 
> great!
> 
> > If an important feature is missing (some of Thomas threading stuff ??)
> > please let us discuss it.
> 
> Well, at least it's important for me, because in my externals (and i think
> to recall also in Olaf's) the clock functions are used for
> inter-thread-communication. For this to work reliably they have to be
> thread-safe. I think that this is the only possibility for threads in PD to
> communicate with the real-time-system.
> I implemented the necessary things in devel_0_36, so i would like to know if
> anyone had problems with it (like timing hickups, deadlocks, clicks etc.). I
> use this version on a regular basis and haven't encountered problems lately.
> Therefore, it would be great if we could merge it into the devel_0_37
> branch.
> 
> best greetings,
> Thomas
> 
> 
> _______________________________________________
> PD-dev mailing list
> PD-dev at iem.kug.ac.at
> http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-dev




More information about the Pd-dev mailing list