[PD] we want threads !!!!

mark mark at junklight.com
Mon Jun 24 15:28:48 CEST 2002


I've been using threads for years now in various languages (mainly Java
(painless) 
and C++ (slightly less so)). 

There is a serious learning curve on threads (some of my team still
stuggle depsite 
working on a very multithreaded application for a couple of years now)
but I 
would suggest that once you get over the curve threads are no more
difficult or 
unreliable than something like pointers. 

The comparision with pointers is a good one actually - remember when you
first 
started using them - all those mysterious GP faults, odd behaviour from
reading 
and writing the wrong bit of memory etc. You soon get to the point where
that 
kind of thing is rare - I think the same is true of threads once you get
your 
head around them they are just as straight forward. 

cheers 

mark 

-----Original Message-----
From: Olaf Matthes [mailto:olaf.matthes at gmx.de] 
Sent: 24 June 2002 12:40
To: pd-list
Subject: Re: [PD] we want threads !!!!




Miller Puckette schrieb:

> Yes, I'm scared to death of threads.  The readsf~/writesf~ objects do 
> use them (there's no alternative) but my experience in general is that

> it's very hard to maintain threaded code if you want a high level of 
> reliability (which I do in Pd)...

The threaded versions of my ogg vorbis streaming externals are largely
based on the readsf~/writesf~ code. It took me some time to fix all the
bugs in my code but after that the externals now work more reliable than
the unthreaded ones.

There's also a (partly) threaded netsend available at
http://www.akustische-kunst.de/puredata/winport.html for those who
haven't noticed it. Maxlib's netdist uses multithreading as well...

Olaf




More information about the Pd-list mailing list