Kill a function while it's being executed
noama at answers.com
Wed Feb 4 06:40:59 EST 2009
I have a script in which I receive a list of functions. I iterate over
the list and run each function. This functions are created by some other
user who is using the lib I wrote. Now, there are some cases in which
the function I receive will never finish (stuck in infinite loop).
Suppose I use a thread which times the amount of time passed since the
function has started, Is there some way I can kill the function after a
certain amount of time has passed (without asking the user who's giving
me the list of functions to make them all have some way of notifying
them to finish)?
More information about the Python-list