On Tue, 11 Jul 2006, Mathieu Bouchard wrote:
A problem with watchdog timeouts is that it's difficult and nonportable for a UNIX signal-handler to influence the normal execution of the thread it runs on top of. As a result, to be portable, those timeouts have to be implemented in a more explicit way than we might want to, and then it wouldn't catch all possible timeouts. (e.g. not while(1){})
What I mean is that there would be a number of checkpoints, e.g. every time a Pd message is sent (by modifying m_pd.c and/or m_obj.c), and such checkpoints would look at a global variable indicating timeout, which is settable from a UNIX/POSIX signal-handler.
Exceptions that don't involve timeouts won't have this problem, but then, for that case, I also had a concept of non-interrupting exception which would be much easier to implement in Pd and would fit more with the style of Pd. It only consists in redirecting pd_error() and error() calls.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada