[PD-dev] Is gensym() threadsafe?

Mathieu Bouchard matju at artengine.ca
Tue Dec 13 23:42:25 CET 2005


On Tue, 13 Dec 2005, Thomas Grill wrote:

> Hi Kjetil, to my mind using syslock is dangerous in any case, because if
> the lock is held by someone else you might wait up to 1 ms (depending on
> your OS turnaround frequency) at this point. Of course it depends on how
> often you use gensym, but i would avoid it.... (although i introduced
> it... my bad)

Btw, I'd like to know, how do I make reference-counting threadsafe? is
there an efficient way? Because in the future that (strings) would become 
the main way to avoid gensym()... rather than being stuck encoding "Hello" 
as "list 72.0 101.0 108.0 108.0 111.0" ...

Btw^2, I'd like to know, how does malloc() work with pthreads? how does it 
achieve threadsafety? what's the impact on realtime?

 _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada




More information about the Pd-dev mailing list