[PD-dev] sys_idlehook

Tim Blechmann TimBlechmann at gmx.net
Thu Nov 10 02:15:02 CET 2005


hi georg.

> --------------8<---------8<----------
> /* sys_idlehook is a hook the user can fill in to grab idle time.
> Return nonzero if you actually used the time; otherwise we're really
> really idle and
> will now sleep. */
> int (*sys_idlehook)(void);
> -------8<------------8<--------------

currently, miller's pd has the feature of using 1 (one) function
pointer as idle hook. you can set it and it will get called.
but if you want to use it, there is _no_ way to make sure, that this
idle hook is not overridden by another function, nor if it will ever be
called.
it gives some functionality, but it's not reliable if you would want to
work with it.
it will work as long as you're the only one, who is using this hook,
and you only set it in one thread.

i doubt that anyone ever used it because of this and thus i removed it
from devel.

the only safe way to do thread synchronisation in miller's pd is using
the sys_lock() ... but locks are bad, so don't use threads :-)

cheers ... tim

-- 
mailto:TimBlechmann at gmx.de    ICQ: 96771783
http://www.mokabar.tk

latest mp3: kMW.mp3
http://mattin.org/mp3.html

latest cd: Goh Lee Kwang & Tim Blechmann: Drone
http://www.geocities.com/gohleekwangtimblechmannduo/

After one look at this planet any visitor from outer space 
would say "I want to see the manager."
				      William S. Burroughs




More information about the Pd-dev mailing list